mirror of https://codeberg.org/cage/tinmop/
- fixed regression: searching in the message window does not get stuck at the first occurence.
This commit is contained in:
parent
c2f3f155aa
commit
68c250e03c
|
@ -480,14 +480,20 @@
|
||||||
|
|
||||||
(defmethod search-regex ((object message-window) regex)
|
(defmethod search-regex ((object message-window) regex)
|
||||||
(with-accessors ((row-selected-index row-selected-index)) object
|
(with-accessors ((row-selected-index row-selected-index)) object
|
||||||
(let ((line-found (rows-position-if object
|
(let* ((selected-row (selected-row object))
|
||||||
(lambda (a)
|
(selected-text (normal-text selected-row))
|
||||||
(scan regex
|
(actual-row-starting (if (scan regex
|
||||||
(tui-string->chars-string (normal-text a))))
|
(tui-string->chars-string selected-text))
|
||||||
:start (clamp row-selected-index
|
(1+ row-selected-index)
|
||||||
0
|
row-selected-index))
|
||||||
(rows-length object))))
|
(line-found (rows-position-if object
|
||||||
(replacements-strings ()))
|
(lambda (a)
|
||||||
|
(scan regex
|
||||||
|
(tui-string->chars-string (normal-text a))))
|
||||||
|
:start (clamp actual-row-starting
|
||||||
|
0
|
||||||
|
(rows-length object))))
|
||||||
|
(replacements-strings ()))
|
||||||
(when line-found
|
(when line-found
|
||||||
(progn
|
(progn
|
||||||
(row-move object (- line-found row-selected-index))
|
(row-move object (- line-found row-selected-index))
|
||||||
|
|
Loading…
Reference in New Issue