diff options
author | sabetts <sabetts> | 2003-05-25 09:14:49 +0000 |
---|---|---|
committer | sabetts <sabetts> | 2003-05-25 09:14:49 +0000 |
commit | b6d1a9b5096e8e26acbe392ca44216d8573427e4 (patch) | |
tree | 0413acabd6dbebc9ef1c75c14d76a84ddd5276d8 /src/actions.c | |
parent | 80406b0d4a10fd807be76df9eeabbd77af55e36e (diff) | |
download | ratpoison-b6d1a9b5096e8e26acbe392ca44216d8573427e4.zip |
* src/bar.c (reset_alarm): new function
(show_bar): call reset_alarm()
(count_lines): make function static. clean up code.
(max_line_length): likewise
(pos_in_line): likewise
(line_beginning): likewise
(draw_string): new static function
(correct_mark): likewise
(prepare_bar): likewise
(get_mark_box): likewise
(draw_inverse_box): likewise
(draw_mark): likewise
(update_last_message): likewise
(marked_message): Move most of the code to seperate function
calls. Call reset_alarm(), prepare_bar(), draw_string(),
correct_mark(), draw_mark(), and update_last_message().
* src/actions.c (cmd_select): fix crash bug.
* src/window.c (get_window_list): mark_end is the length of the
string. Don't do a special case if the window list is being
displayed as a column.
Diffstat (limited to 'src/actions.c')
-rw-r--r-- | src/actions.c | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/src/actions.c b/src/actions.c index ca12c4e..c92fabd 100644 --- a/src/actions.c +++ b/src/actions.c @@ -756,7 +756,6 @@ cmd_select (int interactive, char *data) { char *str; int n; - rp_window *w; if (data == NULL) str = get_input (MESSAGE_PROMPT_SWITCH_TO_WINDOW); @@ -774,17 +773,13 @@ cmd_select (int interactive, char *data) { blank_frame (current_frame()); } -/* else if ((w = find_window_name (str))) */ -/* { */ -/* goto_window (w); */ -/* } */ /* try by number */ else if ((n = string_to_window_number (str)) >= 0) { rp_window_elem *elem = group_find_window_by_number (rp_current_group, n); - if ((w = elem->win)) - goto_window (w); + if (elem) + goto_window (elem->win); else /* show the window list as feedback */ show_bar (current_screen ()); @@ -792,8 +787,10 @@ cmd_select (int interactive, char *data) else /* try by name */ { - if ((w = find_window_name (str))) - goto_window (w); + rp_window *win = find_window_name (str); + + if (win) + goto_window (win); else marked_message_printf (0, 0, " select: unknown window '%s' ", str); } |