]> git.mdlowis.com Git - projs/tide.git/commitdiff
Fixed a bug when indenting reverse selection
authorMichael D. Lowis <mike.lowis@gentex.com>
Tue, 20 Dec 2016 13:35:13 +0000 (08:35 -0500)
committerMichael D. Lowis <mike.lowis@gentex.com>
Tue, 20 Dec 2016 13:35:13 +0000 (08:35 -0500)
TODO.md
libedit/view.c

diff --git a/TODO.md b/TODO.md
index 2115a108162bdd8205f00b144fd795fdd550c48f..4edf7505b7ce011d06a838283baf97dac200ec65 100644 (file)
--- a/TODO.md
+++ b/TODO.md
@@ -1,22 +1,28 @@
 # Implementation Tweaks and Bug Fixes
 
-* Expand tabs setting should be disabled if opened file contains tabs
+* block selection should handle brace-balancing
 * Add tag for ctags lookup and line number jump
 * add a shortcut to autocomplete ctag
-* Add a tools dir to namespace utility scripts only useful inside the editor
-* off by one error on scrolling up with wrapped lines
-* block selection should handle brace-balancing
 * Use select to check for error strings in exec.c
 * Should not be able to undo initial tag line text insertion
-* Implement minimal regex search (per Kernighan article)
-* Implement fuzzy file/buffer/tag picker
-* check for file changes when window regains focus
 * check for file changes on save
 * backspace should delete indent if preceded by whitespace
-* indenting with a reverse selection  expands the selection the wrong way
-* add command line flags to toggle options (Tabs, Indent, etc..)
+* context sensitive selection of words, commands, line numbers, or filenames.
+
+Nice to haves: 
+
+* Expand tabs setting should be disabled if opened file contains tabs
+* Add a tools dir to namespace utility scripts only useful inside the editor
 * shift+click to extend selection
+
+Need to reproduce:
+
 * drag with middle and right mouse buttons causes infinite loops
+* off by one error on scrolling up with wrapped lines
+* Implement minimal regex search (per Kernighan article)
+* check for file changes when window regains focus
+* add command line flags to toggle options (Tabs, Indent, etc..)
+* implement command diffing logic to optimize the undo/redo log
 
 # Auxillary Programs
 
index 5722e79ba96ccfd9177b33b4584bc73b9d8fccf1..c993a6d5dfb181032992a357868f1c5b02921562 100644 (file)
@@ -579,6 +579,7 @@ void view_setln(View* view, size_t line) {
 void view_indent(View* view, int dir) {
     Buf* buf = &(view->buffer);
     unsigned indoff = (buf->expand_tabs ? TabWidth : 1);
+    selswap(&(view->selection));
     view->selection.beg = buf_bol(buf, view->selection.beg);
     view->selection.end = buf_eol(buf, view->selection.end);
     unsigned off = buf_bol(buf, view->selection.end);