]> git.mdlowis.com Git - projs/tide.git/commitdiff
Fixed off-by-one error when clicking the column after the line ending rune
authorMichael D. Lowis <mike@mdlowis.com>
Fri, 16 Dec 2016 02:58:24 +0000 (21:58 -0500)
committerMichael D. Lowis <mike@mdlowis.com>
Fri, 16 Dec 2016 02:58:24 +0000 (21:58 -0500)
TODO.md
libedit/view.c

diff --git a/TODO.md b/TODO.md
index 18124f2d41c80b417bd4d47b0675785398e175a3..2115a108162bdd8205f00b144fd795fdd550c48f 100644 (file)
--- a/TODO.md
+++ b/TODO.md
@@ -1,6 +1,5 @@
 # Implementation Tweaks and Bug Fixes
 
-* investigate weird behavior when editing CRLF files and copy-pasting
 * Expand tabs setting should be disabled if opened file contains tabs
 * Add tag for ctags lookup and line number jump
 * add a shortcut to autocomplete ctag
@@ -9,7 +8,6 @@
 * 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
-* track down double click bug for selecting whole line
 * Implement minimal regex search (per Kernighan article)
 * Implement fuzzy file/buffer/tag picker
 * check for file changes when window regains focus
index 31eb4ebd110d9b666e5d850d7fd19a084e5a6f00..3f173a869ecd778b39452d11bf02ca2c9caef29f 100644 (file)
@@ -160,7 +160,7 @@ static size_t getoffset(View* view, size_t row, size_t col) {
     Row* scrrow = view_getrow(view, row);
     if (!scrrow) return SIZE_MAX;
     size_t pos = scrrow->off;
-    if (col > scrrow->len) {
+    if (col >= scrrow->len) {
         pos = (scrrow->off + scrrow->rlen - 1);
     } else {
         /* multi column runes are followed by \0 slots so if we clicked on a \0