From 6323ca0209383cec1bf774f9723b63a5a4685710 Mon Sep 17 00:00:00 2001 From: Curtis McEnroe Date: Sat, 11 Aug 2018 12:46:21 -0400 Subject: Fix removing entries during tab complete Since tabNext starts on match->next, if match gets removed, it should be set to match->prev so that tabNext will start in the same spot. --- tab.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'tab.c') diff --git a/tab.c b/tab.c index a6bb795..c0a96a4 100644 --- a/tab.c +++ b/tab.c @@ -81,7 +81,7 @@ void tabRemove(struct Tag tag, const char *word) { if (tag.id != TAG_ALL.id && entry->tag != tag.id) continue; if (strcmp(entry->word, word)) continue; unlink(entry); - if (match == entry) match = entry->next; + if (match == entry) match = entry->prev; free(entry->word); free(entry); return; @@ -92,7 +92,7 @@ void tabClear(struct Tag tag) { for (struct Entry *entry = head; entry; entry = entry->next) { if (entry->tag != tag.id) continue; unlink(entry); - if (match == entry) match = entry->next; + if (match == entry) match = entry->prev; free(entry->word); free(entry); } -- cgit 1.4.0 gnupg?showmsg=1&follow=1'>log tree commit diff
path: root/home/.gnupg (unfollow)
Commit message (Collapse)Author
2019-02-18Match Tag in RustJune McEnroe
2019-02-18Match sh functions as TagJune McEnroe
2019-02-18Match Sh and Ss as Tag in mdocJune McEnroe
2019-02-18Match statics and typedefs as TagJune McEnroe
2019-02-18Clean up htmlHeaderJune McEnroe
2019-02-18Remove hi line numberingJune McEnroe
Tags are much better for referring to specific parts of a file and line numbering is better done by a post-processing tool such as cat -n or producing a two-column HTML <table>.
2019-02-18Add Tag class to hiJune McEnroe
2019-02-17Generate HTML with hi -n -f html -o anchorJune McEnroe
Running hi twice to insert stuff between the head and the content is a bit of a hack but oh well.
2019-02-17Add hi -f html -o anchor for line number linksJune McEnroe
2019-02-17Simplify temp trap in upJune McEnroe
2019-02-17Add line numbers to hiJune McEnroe
Renames previous -n option to -m to stay consistent with cat -n. Prefixing lines with line numbers affects where the first tab indent ends up relative to the text above it. Not sure if it's worth fixing somehow.
2019-02-17Always split spans after newlinesJune McEnroe
Simplifies ANSI and IRC output code, and prepares for line numbered output.
2019-02-15Color format specifiers light cyan in vimJune McEnroe
2019-02-15Highlight Interp as yellowJune McEnroe
2019-02-15Highlight strings in sh command substitutionsJune McEnroe
2019-02-15Add nmap gpJune McEnroe
2019-02-14Avoid newline when copying URL to pasteboardJune McEnroe
2019-02-13Add forgotten "sixth" book of H2G2June McEnroe