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 | |
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')
-rw-r--r-- | src/bar.c | 7 | ||||
-rw-r--r-- | src/group.c | 4 |
2 files changed, 8 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); diff --git a/src/group.c b/src/group.c index 80ab89e..38b0fd3 100644 --- a/src/group.c +++ b/src/group.c @@ -443,6 +443,10 @@ groups_merge (rp_group *from, rp_group *to) rp_window_elem *cur; struct list_head *iter, *tmp; + /* Merging a group with itself makes no sense. */ + if (from == to) + return; + /* Move the unmapped windows. */ list_for_each_safe_entry (cur, iter, tmp, &from->unmapped_windows, node) { |