Wabere / garglk

Automatically exported from code.google.com/p/garglk
Other
0 stars 0 forks source link

Remove duplicates in history #47

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Entering the same command several times in succession (like 'z' or 'g')
2. Scrolling up in the history for a previous command
3. Having to skim through dozens of duplicate one- or two-char commands

What is the expected output? What do you see instead?
After entering several 'dumb' commands, like trying out directions (n w s e
etc.), waiting idly (z) or repeating commands (g), it takes a while to find
a previous longer command. Shells like bash or zsh have this feature and it
is indeed useful to have an uncluttered history. 

What version of the product are you using? On what operating system?
gargoyle-2008-11-22-sources_rc4

Please provide any additional information below.

Original issue reported on code.google.com by unixprog@googlemail.com on 29 Nov 2008 at 4:06

GoogleCodeExporter commented 8 years ago
Seems like a useful feature, and relatively easy to implement: when using the up
arrow to scroll through lines, skip any lines that are identical to the current 
line.

Original comment by bcressey@gmail.com on 29 Nov 2008 at 5:09

GoogleCodeExporter commented 8 years ago

Original comment by bcressey@gmail.com on 1 Dec 2008 at 4:37

GoogleCodeExporter commented 8 years ago
Fixed in r127.

Original comment by bcressey@gmail.com on 10 Dec 2008 at 12:48

GoogleCodeExporter commented 8 years ago
Though the new behaviour removes only consecutive duplicates (which is totally 
fine,
I just noticed) I do appreciate it a lot. Also, the restore/save window destroy 
bug
is gone. Huzzah! Thank you for your fast and responsive coding, bcressey!

Original comment by unixprog@googlemail.com on 10 Dec 2008 at 2:24

GoogleCodeExporter commented 8 years ago
Changed in r128 to simply discard the history entries prior to storing them.  
More
efficient, plus it doesn't reduce the effective number of history entries.

I get what you're after - a history free of any duplicates - and I'll ponder 
that
too.  But eliminating adjacent duplicates gets rid of the trouble with 'z', 
'g', or
(my personal pet peeve) multiple 'undo' actions.

Original comment by bcressey@gmail.com on 10 Dec 2008 at 2:58