To: vim-dev@vim.org Subject: Patch 6.1.022 Fcc: outbox From: Bram Moolenaar MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit ------------ Patch 6.1.022 Problem: Grabbing the status line above the command-line window works like the bottom status line was grabbed. (Jim Battle) Solution: Make it possible to grab the status line above the command-line window, so that it can be resized. Files: src/ui.c *** ../vim61.021/src/ui.c Sat Mar 9 16:17:41 2002 --- src/ui.c Sun Apr 21 16:43:51 2002 *************** *** 2161,2166 **** --- 2161,2170 ---- #endif static int prev_row = -1; static int prev_col = -1; + #ifdef FEAT_CMDWIN + static int drag_prev_win = FALSE; /* dragging status line above + command-line window */ + #endif win_T *wp, *old_curwin; pos_T old_cursor; *************** *** 2283,2300 **** } #endif #ifdef FEAT_CMDWIN if (cmdwin_type != 0 && wp != curwin) { /* A click outside the command-line window: Use modeless ! * selection if possible. */ # ifdef FEAT_CLIPBOARD return IN_OTHER_WIN; # else row = 0; col += wp->w_wincol; wp = curwin; - on_status_line = 0; - on_sep_line = 0; # endif } #endif --- 2287,2311 ---- } #endif #ifdef FEAT_CMDWIN + drag_prev_win = FALSE; if (cmdwin_type != 0 && wp != curwin) { /* A click outside the command-line window: Use modeless ! * selection if possible. Allow dragging the status line of the ! * window just above the command-line window. */ ! if (wp == curwin->w_prev) ! drag_prev_win = TRUE; ! else ! on_status_line = 0; ! on_sep_line = 0; # ifdef FEAT_CLIPBOARD + if (drag_prev_win) + return IN_STATUS_LINE; return IN_OTHER_WIN; # else row = 0; col += wp->w_wincol; wp = curwin; # endif } #endif *************** *** 2337,2345 **** --- 2348,2367 ---- else if (on_status_line && which_button == MOUSE_LEFT) { #ifdef FEAT_WINDOWS + wp = curwin; + # ifdef FEAT_CMDWIN + if (cmdwin_type != 0 && drag_prev_win && curwin->w_prev != NULL) + /* Drag the status line of the window above the command-line + * window. */ + curwin = curwin->w_prev; + # endif /* Drag the status line */ count = row - curwin->w_winrow - curwin->w_height + 1 - on_status_line; win_drag_status_line(count); + + # ifdef FEAT_CMDWIN + curwin = wp; + # endif #endif return IN_STATUS_LINE; /* Cursor didn't move */ } *** ../vim61.021/src/version.c Sun Apr 21 15:51:07 2002 --- src/version.c Sun Apr 21 16:47:26 2002 *************** *** 608,609 **** --- 608,611 ---- { /* Add new patch number below this line */ + /**/ + 22, /**/ -- hundred-and-one symptoms of being an internet addict: 264. You turn to the teletext page "surfing report" and are surprised that it is about sizes of waves and a weather forecast for seaside resorts. /// Bram Moolenaar -- Bram@moolenaar.net -- http://www.moolenaar.net \\\ /// Creator of Vim -- http://vim.sf.net -- ftp://ftp.vim.org/pub/vim \\\ \\\ Project leader for A-A-P -- http://www.a-a-p.org /// \\\ Help me helping AIDS orphans in Uganda - http://iccf-holland.org ///