From 806ada9077456310493664957114dfd5d6e4ba46 Mon Sep 17 00:00:00 2001 From: Mike Lowis Date: Mon, 24 Oct 2016 10:15:57 -0400 Subject: [PATCH] fixed a bug in search selection and updated TODO --- TODO.md | 10 ++++++++++ mouse.c | 3 ++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/TODO.md b/TODO.md index d4f8552..1f9d2cb 100644 --- a/TODO.md +++ b/TODO.md @@ -1,5 +1,15 @@ +# Implementation Tweaks and Bug Fixes + +* block selection should handle brace-balancing +* Selecting big words should not wrap newlines +* Right click should fetch file if it exists, search otherwise + * urls should open in web + * directories in browse? + # Internals and Miscellaneous +* Mode to expand tabs to spaces +* change indent of dot * Calculate line numbers and keep up to date while editing * Support multiple buffers * Implement undo/redo log diff --git a/mouse.c b/mouse.c index 89b378e..63af136 100644 --- a/mouse.c +++ b/mouse.c @@ -48,7 +48,8 @@ void selection(MouseEvent* mevnt) { } void search(MouseEvent* mevnt) { - if (DotBeg == DotEnd) { + unsigned clickpos = screen_getoff(&Buffer, DotEnd, mevnt->y, mevnt->x); + if (DotBeg == DotEnd || clickpos < DotBeg || clickpos > DotEnd) { move_cursor(mevnt); selection(mevnt); } -- 2.49.0