cp xfilepick $(PREFIX)/bin
cp xtagpick $(PREFIX)/bin
cp xman $(PREFIX)/bin
+ cp edit $(PREFIX)/bin
uninstall:
rm -f $(PREFIX)/bin/xedit
rm -f $(PREFIX)/bin/xfilepick
rm -f $(PREFIX)/bin/xtagpick
rm -f $(PREFIX)/bin/xman
+ rm -f $(PREFIX)/bin/edit
test: unittests
./unittests
void view_delete(View* view, int dir, bool byword);
void view_bol(View* view, bool extsel);
void view_eol(View* view, bool extsel);
+void view_bof(View* view, bool extsel);
+void view_eof(View* view, bool extsel);
void view_undo(View* view);
void view_redo(View* view);
void view_putstr(View* view, char* str);
view->sync_needed = true;
}
+void view_bof(View* view, bool extsel) {
+ view->selection.end = 0;
+ if (!extsel)
+ view->selection.beg = view->selection.end;
+ view->selection.col = buf_getcol(&(view->buffer), view->selection.end);
+ view->sync_needed = true;
+}
+
+void view_eof(View* view, bool extsel) {
+ view->selection.end = buf_end(&(view->buffer));
+ if (!extsel)
+ view->selection.beg = view->selection.end;
+ view->selection.col = buf_getcol(&(view->buffer), view->selection.end);
+ view->sync_needed = true;
+}
+
void view_undo(View* view) {
view->selection.beg = view->selection.end = buf_undo(&(view->buffer), view->selection.end);
view->selection.col = buf_getcol(&(view->buffer), view->selection.end);
static void cursor_home(void) {
bool extsel = x11_keymodsset(ModShift);
- view_bol(currview(), extsel);
+ if (x11_keymodsset(ModCtrl))
+ view_bof(currview(), extsel);
+ else
+ view_bol(currview(), extsel);
}
static void cursor_end(void) {
bool extsel = x11_keymodsset(ModShift);
- view_eol(currview(), extsel);
+ if (x11_keymodsset(ModCtrl))
+ view_eof(currview(), extsel);
+ else
+ view_eol(currview(), extsel);
}
static void cursor_up(void) {