From: Michael D. Lowis Date: Mon, 2 Jan 2017 04:04:43 +0000 (-0500) Subject: shift+click should extend the selection to the clicked location X-Git-Url: https://git.mdlowis.com/?a=commitdiff_plain;h=7ea5a9bc6066c061881e06f121277bed0918a1e2;p=projs%2Ftide.git shift+click should extend the selection to the clicked location --- diff --git a/TODO.md b/TODO.md index 1197a05..ee8d344 100644 --- a/TODO.md +++ b/TODO.md @@ -17,7 +17,6 @@ The Rest: * Add a GoTo tag for ctags lookup and line number jump * Use select to check for error strings in exec.c * Add a tools dir to namespace utility scripts only useful inside the editor -* shift+click to extend selection * implement command diffing logic to optimize the undo/redo log * add command line flags to toggle options (Tabs, Indent, etc..) * backspace should delete indent if preceded by whitespace diff --git a/xedit.c b/xedit.c index 34146d3..265f236 100644 --- a/xedit.c +++ b/xedit.c @@ -738,12 +738,16 @@ static void exec(char* cmd) { /* Mouse Handling *****************************************************************************/ static void mouse_left(enum RegionId id, size_t count, size_t row, size_t col) { - if (count == 1) - view_setcursor(getview(id), row, col); - else if (count == 2) + if (count == 1) { + if (x11_keymodsset(ModShift)) + view_selext(getview(id), row, col); + else + view_setcursor(getview(id), row, col); + } else if (count == 2) { view_select(getview(id), row, col); - else if (count == 3) + } else if (count == 3) { view_selword(getview(id), row, col); + } } static void mouse_middle(enum RegionId id, size_t count, size_t row, size_t col) {