summaryrefslogtreecommitdiff
path: root/input.c
diff options
context:
space:
mode:
authorXin LI <delphij@FreeBSD.org>2017-11-20 06:53:49 +0000
committerXin LI <delphij@FreeBSD.org>2017-11-20 06:53:49 +0000
commitee3dcfe98fdc32918e3476f437b9603983d6d0be (patch)
tree62ec9b28431130ee7fc5037091ea243b4304955f /input.c
parent6f90225e8378d85045013553763bd7483670441c (diff)
Diffstat (limited to 'input.c')
-rw-r--r--input.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/input.c b/input.c
index 34689bf6a5a5..27be124c7417 100644
--- a/input.c
+++ b/input.c
@@ -7,7 +7,6 @@
* For more information, see the README file.
*/
-
/*
* High level routines dealing with getting lines of input
* from the file being viewed.
@@ -50,6 +49,7 @@ forw_line(curr_pos)
int c;
int blankline;
int endline;
+ int chopped;
int backchars;
get_forw_line:
@@ -143,6 +143,7 @@ get_forw_line:
/*
* Read each character in the line and append to the line buffer.
*/
+ chopped = FALSE;
for (;;)
{
if (ABORT_SIGS())
@@ -193,6 +194,7 @@ get_forw_line:
new_pos = ch_tell();
endline = TRUE;
quit_if_one_screen = FALSE;
+ chopped = TRUE;
} else
{
new_pos = ch_tell() - backchars;
@@ -203,7 +205,7 @@ get_forw_line:
c = ch_forw_get();
}
- pdone(endline, 1);
+ pdone(endline, chopped, 1);
#if HILITE_SEARCH
if (is_filtered(base_pos))
@@ -255,6 +257,7 @@ back_line(curr_pos)
POSITION new_pos, begin_new_pos, base_pos;
int c;
int endline;
+ int chopped;
int backchars;
get_back_line:
@@ -359,6 +362,7 @@ get_back_line:
loop:
begin_new_pos = new_pos;
(void) ch_seek(new_pos);
+ chopped = FALSE;
do
{
@@ -391,6 +395,7 @@ get_back_line:
if (chopline || hshift > 0)
{
endline = TRUE;
+ chopped = TRUE;
quit_if_one_screen = FALSE;
break;
}
@@ -405,7 +410,7 @@ get_back_line:
}
} while (new_pos < curr_pos);
- pdone(endline, 0);
+ pdone(endline, chopped, 0);
#if HILITE_SEARCH
if (is_filtered(base_pos))