aboutsummaryrefslogtreecommitdiff
path: root/vis.c
diff options
context:
space:
mode:
authorMarc André Tanner <mat@brain-dump.org>2015-08-07 22:33:43 +0200
committerMarc André Tanner <mat@brain-dump.org>2015-08-07 22:33:43 +0200
commit2425c1614f51c1c3641ccd2c99f3e751c8ceb421 (patch)
treec5768f95e0062d8bf9e9b5ede66109371e957570 /vis.c
parentfd89e4dd1418d1474894d09c0ea8418f32dba490 (diff)
downloadvis-2425c1614f51c1c3641ccd2c99f3e751c8ceb421.tar.gz
vis-2425c1614f51c1c3641ccd2c99f3e751c8ceb421.tar.xz
vis: limit to/till movements to current line
Diffstat (limited to 'vis.c')
-rw-r--r--vis.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/vis.c b/vis.c
index a4917e9..7d3ad7c 100644
--- a/vis.c
+++ b/vis.c
@@ -740,7 +740,7 @@ static size_t mark_line_goto(File *txt, size_t pos) {
static size_t to(Text *txt, size_t pos) {
char c;
- size_t hit = text_find_next(txt, pos+1, vis->search_char);
+ size_t hit = text_line_find_next(txt, pos+1, vis->search_char);
if (!text_byte_get(txt, hit, &c) || c != vis->search_char[0])
return pos;
return hit;
@@ -757,7 +757,7 @@ static size_t to_left(Text *txt, size_t pos) {
char c;
if (pos == 0)
return pos;
- size_t hit = text_find_prev(txt, pos-1, vis->search_char);
+ size_t hit = text_line_find_prev(txt, pos-1, vis->search_char);
if (!text_byte_get(txt, hit, &c) || c != vis->search_char[0])
return pos;
return hit;