diff options
author | sabetts <sabetts> | 2003-06-02 22:49:35 +0000 |
---|---|---|
committer | sabetts <sabetts> | 2003-06-02 22:49:35 +0000 |
commit | bfc0e82b9a7638e84a5d92e03d07b5614f47abac (patch) | |
tree | 23a7ced773e32b48b6c8a1665aec15d9c55ad925 /src/bar.c | |
parent | ca80e91cd40658b5cee1afaf4c559cabf736e6fa (diff) | |
download | ratpoison-bfc0e82b9a7638e84a5d92e03d07b5614f47abac.zip |
* src/group.c (groups_merge): don't merge a group with itself.
* src/bar.c (draw_mark): abort if mark_end is the beginning of the
line or the start and end of the mark is the same.
Diffstat (limited to 'src/bar.c')
-rw-r--r-- | src/bar.c | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -397,9 +397,6 @@ get_mark_box (char *msg, int mark_start, int mark_end, int start_line_beginning; int end_line_beginning; - if (mark_end == 0) - return; - /* If the mark_end is on a new line or the end of the string, then back it up one character. */ if (msg[mark_end-1] == '\n' || mark_end == strlen (msg)) @@ -480,6 +477,10 @@ draw_mark (rp_screen *s, char *msg, int mark_start, int mark_end) { int x, y, width, height; + /* when this happens, there is no mark. */ + if (mark_end == 0 || mark_start == mark_end) + return; + get_mark_box (msg, mark_start, mark_end, &x, &y, &width, &height); draw_inverse_box (s, x, y, width, height); |