diff options
author | bptato <nincsnevem662@gmail.com> | 2023-01-01 16:14:01 +0100 |
---|---|---|
committer | bptato <nincsnevem662@gmail.com> | 2023-01-01 18:31:17 +0100 |
commit | 1a24350ee44859f6b3370ac15e8875a79fa7ae9b (patch) | |
tree | 0c168d725baa44bf1813c1456c9c835c4e1bf776 /src/display | |
parent | 9a22a844c956d80f0d5c80330e898d52acadfd2f (diff) | |
download | chawan-1a24350ee44859f6b3370ac15e8875a79fa7ae9b.tar.gz |
buffer: fix some search bugs & refactor regex stuff
cursorBytes uses twidth now. cursorNextMatch matches the byte *after* the cursor (somewhat more consistently than before). match() no longer counts capture groups. LRE_FLAG_GLOBAL now goes through the entire string.
Diffstat (limited to 'src/display')
-rw-r--r-- | src/display/pager.nim | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/display/pager.nim b/src/display/pager.nim index 7e4be928..bc9a33c1 100644 --- a/src/display/pager.nim +++ b/src/display/pager.nim @@ -649,11 +649,11 @@ proc updateReadLineISearch(pager: Pager, linemode: LineMode) = if x != "": pager.iregex = compileSearchRegex(x) pager.container.popCursorPos(true) if pager.iregex.isSome: + pager.container.hlon = true if linemode == ISEARCH_F: pager.container.cursorNextMatch(pager.iregex.get, pager.config.searchwrap) else: pager.container.cursorPrevMatch(pager.iregex.get, pager.config.searchwrap) - pager.container.hlon = true pager.container.pushCursorPos() of FINISH: if pager.iregex.isSome: |