Bug 177819

Summary: seek-to-end key causes spurious screen redraws
Product: [Fedora] Fedora Reporter: Avi Kivity <avi>
Component: lessAssignee: Ivana Varekova <varekova>
Status: CLOSED RAWHIDE QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 6Keywords: Reopened
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2007-10-22 08:44:48 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
fix for growing file without end-of-line at end, without unconditional repaint none

Description Avi Kivity 2006-01-14 21:22:59 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (compatible; Konqueror/3.5; Linux; X11; i686) KHTML/3.5.0 (like Gecko)

Description of problem:
When pressing the seek-to-end key ('>') twice, the second keypress causes an 
unnecessary, and very annoying, screen redraw. 
 
This is not very visible on the console, but very visible on konsole and 
gnome-terminal. 

Version-Release number of selected component (if applicable):
less-394-1.fc4

How reproducible:
Always

Steps to Reproduce:
1. less /var/log/messages (or some text file) 
2. type '>' 
3. type '>' 
   

Actual Results:  screen scrolls down and up quickly  

Expected Results:  no flicker  

Additional info:

LANG=en_US.UTF-8 
 
Less worked well before the last update.

Comment 1 Jindrich Novy 2006-01-16 12:04:05 UTC
This seems to be related to bug 120916. The possible flickering of the terminal
when pressing '>' multiple times I don't consider a bug. The flickering is very
hardly noticable in konsole and gnome-terminal as far as I can see and it's
needed to solve the bug, which allows less to display incorrect contents in a
viewed file.

When comparing flickering sometimes when pressing '>' multiple times with
dislaying incorrect contents, I vote for flickering, sorry.

If you have a different solution, feel free to reopen this bug and add it here.

Comment 2 Avi Kivity 2006-01-16 12:08:30 UTC
The flickering is very noticable for me. As I'm a heavy less user, I'll look 
at producing a patch for only repainting if the file changed. Would that be 
acceptable? 
 
 

Comment 3 Jindrich Novy 2006-01-16 12:16:42 UTC
Yes, feel free to send a patch here. I'll review it and if it's better than the
fix for bug 120916, I'll be happy to apply it.

Comment 4 Avi Kivity 2006-01-16 13:38:56 UTC
I have a patch. 

Comment 5 Avi Kivity 2006-01-16 13:48:30 UTC
Created attachment 123236 [details]
fix for growing file without end-of-line at end, without unconditional repaint

attached patch fixes the symptoms of bug 120916, without the unconditional
repaint. after the seek it checks whether the end-of-file position is
displayed, and if not, triggers a repaint.

should be applied instead of less-382-fixline.patch.

Comment 6 Jindrich Novy 2006-01-16 13:51:37 UTC
Thanks, let me test it.

Comment 7 Jindrich Novy 2006-01-16 14:16:11 UTC
Looks good, applied in CVS.

Comment 8 Jindrich Novy 2006-01-16 14:21:59 UTC
The fix should appear in the tomorrow's rawhide.

Comment 9 Avi Kivity 2006-01-16 15:05:42 UTC
Thank you for the quick response. 
 
I presume if it works out it'll go to FC4 as well? 

Comment 10 Jindrich Novy 2006-01-16 15:18:06 UTC
Yes, I'll wait for a while to collect more fixes for less and then I'm going to
release an update for FC3/FC4.

Comment 11 Jindrich Novy 2006-01-16 15:19:43 UTC
Closing RAWHIDE for now.

Thanks for your patch and good work!

Comment 12 Avi Kivity 2007-02-25 05:56:33 UTC
Bug is back.  Redraws on unchanged files when pressing '>' repeatedly.  Seen 
best (and most annoying) over ssh on a high-latency link.

Comment 13 Avi Kivity 2007-02-25 05:57:25 UTC
less-394-5.fc6

Comment 14 Ivana Varekova 2007-05-21 13:43:06 UTC
I try to reproduce you r problem but I was unsuccesfull. Could you please try to
reproduce this bug with the last version of less - less-394-9.fc7.

Comment 15 Avi Kivity 2007-05-29 18:40:35 UTC
It reproduces.  I tried in both Konsole and xterm.


xterm
ssh localhost
less /var/log/messages
press '>' repeatedly (or hold it down)

Comment 16 Ivana Varekova 2007-10-22 08:44:48 UTC
These problems are fixed in less-409-1.fr9 if there is any problem, please
reopen this bug.