mirror of
https://github.com/irssi/irssi.git
synced 2024-11-03 04:27:19 -05:00
Handle empty bracketed pastes (or sequences of those)
Both cases were off-by-one mistakes erring on the side of being too conservative. This fixes these two harmless issues: - For a single empty paste, it required another keystroke before processing it - For a sequence of themcase, a single '~' was left in the input
This commit is contained in:
parent
c721d57688
commit
7866d2bcd6
@ -685,7 +685,7 @@ static void paste_bracketed_middle()
|
||||
int len = paste_buffer->len - marklen;
|
||||
unichar *ptr = (unichar *) paste_buffer->data;
|
||||
|
||||
if (len <= 0) {
|
||||
if (len < 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
@ -702,10 +702,8 @@ static void paste_bracketed_middle()
|
||||
len -= marklen * 2;
|
||||
|
||||
/* go one step back */
|
||||
if (i > 0) {
|
||||
i--;
|
||||
ptr--;
|
||||
}
|
||||
continue;
|
||||
}
|
||||
paste_bracketed_end(i, i != len);
|
||||
|
Loading…
Reference in New Issue
Block a user