[Geany-devel] [PATCH 14/19] Rewrite tab switching queue

Jiří Techet techet at xxxxx
Wed Aug 4 23:59:48 UTC 2010

There was one more bug related to the tab switching. When we switch
so many times that we return back to the original document (so we
actually don't switch at all) then the following switch attempt
doesn't switch immediately to the next document.

After spending two hours thinking what is wrong, I gave up and rewrote
the whole thing in a different way. The problem with the previous
implementation was that before you couldn't just look what's in the queue
"now" - you had to imagine what will be inserted there in the next step
because the switch_in_progress variable was set after the first switch
(this is also why I put the long comment why mru_pos = 2 - that is not
clear at all when you first look at it). Also there were some not very
nice "workarounds" like the idle function that was executed after the
switch and removed the double entry on top of the queue.

So with the new implementation things are much simpler IMO. The queue
starts with the current document and the previously opened documments
follow. It's *always* like that, no exceptions. The idle function
is gone and cb_func_switch_tablastused() is simplified too. The rest of
the functionality should be clear from the code.

Signed-off-by: Jiří Techet <techet at gmail.com>
 src/keybindings.c |   65 +++++++++++++++++++++++-----------------------------
 1 files changed, 29 insertions(+), 36 deletions(-)

-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0014-Rewrite-tab-switching-queue.patch
Type: text/x-patch
Size: 4031 bytes
Desc: not available
URL: <http://lists.geany.org/pipermail/devel/attachments/20100805/f5ac1872/attachment.bin>

More information about the Devel mailing list