summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 9c1a6e3)
raw | patch | inline | side by side (parent: 9c1a6e3)
author | Patrick Hallen <patrick.hallen@rwth-aachen.de> | |
Sat, 28 Mar 2009 18:01:31 +0000 (19:01 +0100) | ||
committer | Patrick Hallen <patrick.hallen@rwth-aachen.de> | |
Sat, 28 Mar 2009 18:01:31 +0000 (19:01 +0100) |
Deleting widecharacters with backspace would leave bytes in the buffer
before. Now every byte of a deleted widecharacter is replaced with '\0'.
before. Now every byte of a deleted widecharacter is replaced with '\0'.
src/screen_utils.c | patch | blob | history |
diff --git a/src/screen_utils.c b/src/screen_utils.c
index 971b8838b8bc27aab4690285fd4c42651bca5d48..8eddfc597fd46c33d4489cbbe4bbac54ea943cff 100644 (file)
--- a/src/screen_utils.c
+++ b/src/screen_utils.c
key = screen_getch(screen.status_window.w, screen.findbuf);
/* if backspace or delete was pressed */
if (key == KEY_BACKSPACE || key == 330) {
+ int i;
/* don't end the loop */
key = 65;
if (search_str <= g_utf8_find_prev_char(screen.findbuf, iter))
iter = g_utf8_find_prev_char(screen.findbuf, iter);
- *iter = '\0';
+ for (i = 0; *(iter + i) != '\0'; i++)
+ *(iter + i) = '\0';
continue;
}
else {