1
0
forked from aniani/vim

updated for version 7.0187

This commit is contained in:
Bram Moolenaar
2006-01-25 22:02:51 +00:00
parent 7df351eb8a
commit 28c258fd24
8 changed files with 113 additions and 17 deletions

View File

@@ -4758,7 +4758,21 @@ buf_spname(buf)
{
#if defined(FEAT_QUICKFIX) && defined(FEAT_WINDOWS)
if (bt_quickfix(buf))
return _("[Error List]");
{
win_T *win;
/*
* For location list window, w_llist_ref points to the location list.
* For quickfix window, w_llist_ref is NULL.
*/
FOR_ALL_WINDOWS(win)
if (win->w_buffer == buf)
break;
if (win != NULL && win->w_llist_ref != NULL)
return _("[Location List]");
else
return _("[Error List]");
}
#endif
#ifdef FEAT_QUICKFIX
/* There is no _file_ when 'buftype' is "nofile", b_sfname

View File

@@ -2365,7 +2365,7 @@ vgetorpeek(advance)
colnr_T col = 0, vcol;
char_u *ptr;
if (p_smd && msg_silent == 0)
if (mode_displayed)
{
unshowmode(TRUE);
mode_deleted = TRUE;
@@ -2643,7 +2643,7 @@ vgetorpeek(advance)
*/
if (advance && p_smd && msg_silent == 0 && (State & INSERT))
{
if (c == ESC && !mode_deleted && !no_mapping)
if (c == ESC && !mode_deleted && !no_mapping && mode_displayed)
{
if (typebuf.tb_len && !KeyTyped)
redraw_cmdline = TRUE; /* delete mode later */

View File

@@ -1004,7 +1004,10 @@ mark_adjust(line1, line2, amount, amount_after)
#ifdef FEAT_QUICKFIX
/* quickfix marks */
qf_mark_adjust(line1, line2, amount, amount_after);
qf_mark_adjust(NULL, line1, line2, amount, amount_after);
/* location lists */
FOR_ALL_WINDOWS(win)
qf_mark_adjust(win, line1, line2, amount, amount_after);
#endif
#ifdef FEAT_SIGNS

View File

@@ -1714,7 +1714,7 @@ do_pending_operator(cap, old_col, gui_yank)
setmouse();
mouse_dragging = 0;
# endif
if (p_smd && msg_silent == 0)
if (mode_displayed)
clear_cmdline = TRUE; /* unshow visual mode later */
#ifdef FEAT_CMDL_INFO
else
@@ -2779,7 +2779,10 @@ do_mouse(oap, c, dir, count, fixindent)
{
if (State & INSERT)
stuffcharReadbuff(Ctrl_O);
stuffReadbuff((char_u *)":.cc\n");
if (curwin->w_llist_ref == NULL) /* quickfix window */
stuffReadbuff((char_u *)":.cc\n");
else /* location list window */
stuffReadbuff((char_u *)":.ll\n");
got_click = FALSE; /* ignore drag&release now */
}
#endif
@@ -2948,8 +2951,9 @@ do_mouse(oap, c, dir, count, fixindent)
}
/* If Visual mode changed show it later. */
if (p_smd && msg_silent == 0
&& (VIsual_active != old_active || VIsual_mode != old_mode))
if ((!VIsual_active && old_active && mode_displayed)
|| (VIsual_active && p_smd && msg_silent == 0
&& (!old_active || VIsual_mode != old_mode)))
redraw_cmdline = TRUE;
#endif
@@ -3115,7 +3119,7 @@ end_visual_mode()
curwin->w_cursor.coladd = 0;
#endif
if (p_smd && msg_silent == 0)
if (mode_displayed)
clear_cmdline = TRUE; /* unshow visual mode later */
#ifdef FEAT_CMDL_INFO
else
@@ -5713,7 +5717,10 @@ nv_down(cap)
#if defined(FEAT_WINDOWS) && defined(FEAT_QUICKFIX)
/* In a quickfix window a <CR> jumps to the error under the cursor. */
if (bt_quickfix(curbuf) && cap->cmdchar == CAR)
do_cmdline_cmd((char_u *)".cc");
if (curwin->w_llist_ref == NULL)
do_cmdline_cmd((char_u *)".cc"); /* quickfix window */
else
do_cmdline_cmd((char_u *)".ll"); /* location list window */
else
#endif
{
@@ -8282,7 +8289,7 @@ nv_normal(cap)
if (cap->nchar == Ctrl_N || cap->nchar == Ctrl_G)
{
clearop(cap->oap);
if (restart_edit != 0 && p_smd && msg_silent == 0)
if (restart_edit != 0 && mode_displayed)
clear_cmdline = TRUE; /* unshow mode later */
restart_edit = 0;
#ifdef FEAT_CMDWIN

View File

@@ -518,8 +518,9 @@ newwindow:
*/
if (bt_quickfix(curbuf))
{
sprintf((char *)cbuf, "split +%ldcc",
(long)curwin->w_cursor.lnum);
sprintf((char *)cbuf, "split +%ld%s",
(long)curwin->w_cursor.lnum,
(curwin->w_llist_ref == NULL) ? "cc" : "ll");
do_cmdline_cmd(cbuf);
}
#endif
@@ -816,6 +817,9 @@ win_split_ins(size, flags, newwin, dir)
wp->w_prev_fraction_row = curwin->w_prev_fraction_row;
#ifdef FEAT_JUMPLIST
copy_jumplist(curwin, wp);
#endif
#ifdef FEAT_QUICKFIX
copy_loclist(curwin, wp);
#endif
if (curwin->w_localdir != NULL)
wp->w_localdir = vim_strsave(curwin->w_localdir);
@@ -3182,6 +3186,10 @@ win_free(wp)
free_jumplist(wp);
#endif
#ifdef FEAT_QUICKFIX
qf_free_all(wp);
#endif
#ifdef FEAT_GUI
if (gui.in_use)
{