From: Michael D. Lowis Date: Tue, 20 Dec 2016 13:35:13 +0000 (-0500) Subject: Fixed a bug when indenting reverse selection X-Git-Url: https://git.mdlowis.com/?a=commitdiff_plain;h=2c8b8d295d1bd8a6b7a91455f60888c4e5680110;p=projs%2Ftide.git Fixed a bug when indenting reverse selection --- diff --git a/TODO.md b/TODO.md index 2115a10..4edf750 100644 --- 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 diff --git a/libedit/view.c b/libedit/view.c index 5722e79..c993a6d 100644 --- a/libedit/view.c +++ b/libedit/view.c @@ -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);