The Rest:
+* Auto-save on focus change or quit
* Implement EWMH hooks to prevent window manager killing client with modifications
* Implement X Selection protocol for handling clipboard and primary selections
* add a distinct state for pointer move versus drag
}
void view_selprev(View* view) {
- buf_loglock(&(view->buffer));
- Sel sel = view->selection;
- buf_lastins(&(view->buffer), &sel.beg, &sel.end);
- view->selection = sel;
+ if (!num_selected(view->selection)) {
+ buf_loglock(&(view->buffer));
+ Sel sel = view->selection;
+ buf_lastins(&(view->buffer), &sel.beg, &sel.end);
+ view->selection = sel;
+ } else {
+ view->selection.beg = view->selection.end;
+ }
}
void view_select(View* view, size_t row, size_t col) {