=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/vim/Attic/screen.c,v retrieving revision 1.1 retrieving revision 1.2 diff -c -r1.1 -r1.2 *** src/usr.bin/vim/Attic/screen.c 1996/09/07 21:40:24 1.1 --- src/usr.bin/vim/Attic/screen.c 1996/09/21 06:23:18 1.2 *************** *** 1,4 **** ! /* $OpenBSD: screen.c,v 1.1 1996/09/07 21:40:24 downsj Exp $ */ /* vi:set ts=4 sw=4: * * VIM - Vi IMproved by Bram Moolenaar --- 1,4 ---- ! /* $OpenBSD: screen.c,v 1.2 1996/09/21 06:23:18 downsj Exp $ */ /* vi:set ts=4 sw=4: * * VIM - Vi IMproved by Bram Moolenaar *************** *** 2953,2963 **** * If clear_cmdline is TRUE, clear the rest of the cmdline. * If clear_cmdline is FALSE there may be a message there that needs to be * cleared only if a mode is shown. */ ! void showmode() { int need_clear = FALSE; int do_mode = (p_smd && ((State & INSERT) || restart_edit || VIsual_active)); --- 2953,2965 ---- * If clear_cmdline is TRUE, clear the rest of the cmdline. * If clear_cmdline is FALSE there may be a message there that needs to be * cleared only if a mode is shown. + * Return the lenght of the message (0 if no message). */ ! int showmode() { int need_clear = FALSE; + int length = 0; int do_mode = (p_smd && ((State & INSERT) || restart_edit || VIsual_active)); *************** *** 3045,3050 **** --- 3047,3053 ---- if (need_clear || clear_cmdline) msg_clr_eos(); msg_didout = FALSE; /* overwrite this message */ + length = msg_col; msg_col = 0; } else if (clear_cmdline) /* just clear anything */ *************** *** 3055,3060 **** --- 3058,3065 ---- } win_redr_ruler(lastwin, TRUE); redraw_cmdline = FALSE; + + return length; } /* *************** *** 3224,3230 **** on_status_line = row - wp->w_height + 1; else on_status_line = 0; ! win_enter(wp, TRUE); if (on_status_line) /* In (or below) status line */ { /* Don't use start_arrow() if we're in the same window */ --- 3229,3235 ---- on_status_line = row - wp->w_height + 1; else on_status_line = 0; ! win_enter(wp, TRUE); /* can make wp invalid! */ if (on_status_line) /* In (or below) status line */ { /* Don't use start_arrow() if we're in the same window */ *************** *** 3286,3295 **** col = Columns - 1 - col; #endif - if (curwin->w_p_nu) /* skip number in front of the line */ - if ((col -= 8) < 0) - col = 0; - if (curwin->w_p_wrap) /* lines wrap */ { while (row) --- 3291,3296 ---- *************** *** 3319,3324 **** --- 3320,3330 ---- } col += curwin->w_leftcol; } + + if (curwin->w_p_nu) /* skip number in front of the line */ + if ((col -= 8) < 0) + col = 0; + curwin->w_curswant = col; curwin->w_set_curswant = FALSE; /* May still have been TRUE */ if (coladvance(col) == FAIL)