From 574a96e7beb091762046ce4b04fb41dcf82bc2fc Mon Sep 17 00:00:00 2001 From: sabetts Date: Sat, 5 Apr 2003 23:54:30 +0000 Subject: * src/window.c (get_window_list): if wrap_window_list is on then the end of the mark is the length of the buffer minus the start of the mark. * src/main.c (init_defaults): init wrap_window_list to 0. * src/input.c (update_input_window): store the height in a variable. * src/data.h (struct rp_defaults): new member, wrap_window_list. * src/bar.h [message]: wrap msg arg in parens. (marked_wrapped_message): new prototype * src/bar.c (bar_y): new argument, height. All callers updated. (bar_y): use height in calculations. (update_window_names): print a column of windows if defaults.wrap_window_list is on. (count_lines): new function (max_line_length): likewise (pos_in_line): likewise (line_beginning): likewise (marked_wrapped_message): likewise * src/actions.c (user_commands): new commands 'verbexec' and 'defwrapwinlist'. Move @end take to after the def* commands. (cmd_verbexec): new function. Added prototype. (cmd_defwrapwinlist): likewise --- src/input.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/input.c') diff --git a/src/input.c b/src/input.c index a5d5461..0d788ae 100644 --- a/src/input.c +++ b/src/input.c @@ -293,9 +293,10 @@ update_input_window (screen_info *s, char *prompt, char *input, int input_len) { int prompt_width = XTextWidth (defaults.font, prompt, strlen (prompt)); int input_width = XTextWidth (defaults.font, input, input_len); - int width; + int width, height; width = defaults.bar_x_padding * 2 + prompt_width + input_width; + height = (FONT_HEIGHT (defaults.font) + defaults.bar_y_padding * 2); if (width < defaults.input_window_size + prompt_width) { @@ -303,8 +304,7 @@ update_input_window (screen_info *s, char *prompt, char *input, int input_len) } XMoveResizeWindow (dpy, s->input_window, - bar_x (s, width), bar_y (s), width, - (FONT_HEIGHT (defaults.font) + defaults.bar_y_padding * 2)); + bar_x (s, width), bar_y (s, height), width, height); XClearWindow (dpy, s->input_window); XSync (dpy, False); -- cgit v1.2.3