From 7e990b09e28cdc0913af4e214af1ec46b1b859cd Mon Sep 17 00:00:00 2001 From: Xin LI Date: Sun, 17 Jun 2007 23:20:43 +0000 Subject: [PATCH] Apply a vendor patch that fixes very annoying bug which caused the cursor not to return to the place it should when -w is used with -e. Note that this is a commit against -HEAD because we already have the file off the vendor branch. Reported by: Tom Uffner (on -current@) Obtained from: http://www.greenwoodsoftware.com/less/less-405.tar.gz --- contrib/less/search.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/contrib/less/search.c b/contrib/less/search.c index ccc07bd7e29..e81bce5c81d 100644 --- a/contrib/less/search.c +++ b/contrib/less/search.c @@ -294,6 +294,7 @@ clear_attn() POSITION old_end_attnpos; POSITION pos; POSITION epos; + int moved = 0; if (start_attnpos == NULL_POSITION) return; @@ -321,8 +322,11 @@ clear_attn() (void) forw_line(pos); goto_line(slinenum); put_line(); + moved = 1; } } + if (moved) + lower_left(); } #endif