Compare commits

...

7 Commits

Author SHA1 Message Date
Bram Moolenaar
6427c608e7 updated for version 7.2.355
Problem:    Computing the cursor column in validate_cursor_col() is wrong when
            line numbers are used and 'n' is not in 'cpoptions', causing the
            popup menu to be positioned wrong.
Solution:   Correctly use the offset. (partly by Dominique Pelle)
2010-02-03 17:43:07 +01:00
Bram Moolenaar
990bb661a1 updated for version 7.2.354
Problem:    Japanese single-width double-byte characters not handled correctly.
Solution:   Put 0x8e in ScreenLines[] and the second byte in ScreenLines2[].
            (partly by Kikuchan)
2010-02-03 15:48:04 +01:00
Bram Moolenaar
f86f26c06a updated for version 7.2.353
Problem:    No command line completion for ":profile".
Solution:   Complete the subcommand and file name.
2010-02-03 15:14:22 +01:00
Bram Moolenaar
4d526ad35a updated for version 7.2.352
Problem:    Win64: Vim doesn't work when cross-compiled with MingW libraries.
Solution:   Always return TRUE for the WM_NCCREATE message. (Andy Kittner)
2010-02-03 12:23:24 +01:00
Bram Moolenaar
d21d9a6c61 updated for version 7.2.351
Problem:    Can't build with some compilers.
Solution:   Move the #ifdef outside of a macro.  Cleanup the code.
2010-01-28 22:58:16 +01:00
Bram Moolenaar
c5d5d01ad9 updated for version 7.2.350
Problem:    Win32: When changing font the window may jump from the secondary
            to the primary screen. (Michael Wookey)
Solution:   When the screen position was negative don't correct it to zero.
2010-01-27 21:05:05 +01:00
Bram Moolenaar
6d1dcffc35 updated for version 7.2.349
Problem:    CTRL-W gf doesn't put the new tab in the same place as "tab split"
            and "gf". (Tony Mechelynck)
Solution:   Store the tab number in cmdmod.tab.
2010-01-27 20:26:46 +01:00
12 changed files with 149 additions and 28 deletions

View File

@@ -1115,6 +1115,79 @@ ex_profile(eap)
}
}
/* Command line expansion for :profile. */
static enum
{
PEXP_SUBCMD, /* expand :profile sub-commands */
PEXP_FUNC, /* expand :profile func {funcname} */
} pexpand_what;
static char *pexpand_cmds[] = {
"start",
#define PROFCMD_START 0
"pause",
#define PROFCMD_PAUSE 1
"continue",
#define PROFCMD_CONTINUE 2
"func",
#define PROFCMD_FUNC 3
"file",
#define PROFCMD_FILE 4
NULL
#define PROFCMD_LAST 5
};
/*
* Function given to ExpandGeneric() to obtain the profile command
* specific expansion.
*/
char_u *
get_profile_name(xp, idx)
expand_T *xp UNUSED;
int idx;
{
switch (pexpand_what)
{
case PEXP_SUBCMD:
return (char_u *)pexpand_cmds[idx];
/* case PEXP_FUNC: TODO */
default:
return NULL;
}
}
/*
* Handle command line completion for :profile command.
*/
void
set_context_in_profile_cmd(xp, arg)
expand_T *xp;
char_u *arg;
{
char_u *end_subcmd;
int len;
/* Default: expand subcommands. */
xp->xp_context = EXPAND_PROFILE;
pexpand_what = PEXP_SUBCMD;
xp->xp_pattern = arg;
end_subcmd = skiptowhite(arg);
if (*end_subcmd == NUL)
return;
len = end_subcmd - arg;
if (len == 5 && STRNCMP(arg, "start", 5) == 0)
{
xp->xp_context = EXPAND_FILES;
xp->xp_pattern = skipwhite(end_subcmd);
return;
}
/* TODO: expand function names after "func" */
xp->xp_context = EXPAND_NOTHING;
}
/*
* Dump the profiling info.
*/

View File

@@ -3804,6 +3804,11 @@ set_one_cmd_context(xp, buff)
xp->xp_context = EXPAND_NOTHING;
break;
#endif
#if defined(FEAT_PROFILE)
case CMD_profile:
set_context_in_profile_cmd(xp, arg);
break;
#endif
#endif /* FEAT_CMDL_COMPL */

View File

@@ -4522,6 +4522,9 @@ ExpandFromContext(xp, pat, num_file, file, options)
#ifdef FEAT_SIGNS
{EXPAND_SIGN, get_sign_name, TRUE},
#endif
#ifdef FEAT_PROFILE
{EXPAND_PROFILE, get_profile_name, TRUE},
#endif
#if (defined(HAVE_LOCALE_H) || defined(X_LOCALE)) \
&& (defined(FEAT_GETTEXT) || defined(FEAT_MBYTE))
{EXPAND_LANGUAGE, get_lang_arg, TRUE},

View File

@@ -2492,17 +2492,24 @@ vgetorpeek(advance)
i = FAIL;
else
{
i = ins_typebuf(s,
save_m_noremap != REMAP_YES
? save_m_noremap
: STRNCMP(s,
int noremap;
if (save_m_noremap != REMAP_YES)
noremap = save_m_noremap;
else if (
#ifdef FEAT_EVAL
save_m_keys != NULL ? save_m_keys :
STRNCMP(s, save_m_keys != NULL
? save_m_keys : mp->m_keys,
(size_t)keylen)
#else
STRNCMP(s, mp->m_keys, (size_t)keylen)
#endif
mp->m_keys,
(size_t)keylen) != 0
? REMAP_YES : REMAP_SKIP,
0, TRUE, cmd_silent || save_m_silent);
!= 0)
noremap = REMAP_YES;
else
noremap = REMAP_SKIP;
i = ins_typebuf(s, noremap,
0, TRUE, cmd_silent || save_m_silent);
#ifdef FEAT_EVAL
if (save_m_expr)
vim_free(s);

View File

@@ -1390,6 +1390,7 @@ gui_set_shellsize(mustset, fit_to_display, direction)
int un_maximize = mustset;
int did_adjust = 0;
#endif
int x = -1, y = -1;
if (!gui.shell_created)
return;
@@ -1406,6 +1407,10 @@ gui_set_shellsize(mustset, fit_to_display, direction)
base_width = gui_get_base_width();
base_height = gui_get_base_height();
if (fit_to_display)
/* Remember the original window position. */
gui_mch_get_winpos(&x, &y);
#ifdef USE_SUN_WORKSHOP
if (!mustset && usingSunWorkShop
&& workshop_get_width_height(&width, &height))
@@ -1473,11 +1478,12 @@ gui_set_shellsize(mustset, fit_to_display, direction)
gui_mch_set_shellsize(width, height, min_width, min_height,
base_width, base_height, direction);
if (fit_to_display)
{
int x, y;
/* Some window managers put the Vim window left of/above the screen. */
if (fit_to_display && x >= 0 && y >= 0)
{
/* Some window managers put the Vim window left of/above the screen.
* Only change the position if it wasn't already negative before
* (happens on MS-Windows with a secondary monitor). */
gui_mch_update();
if (gui_mch_get_winpos(&x, &y) == OK && (x < 0 || y < 0))
gui_mch_set_winpos(x < 0 ? 0 : x, y < 0 ? 0 : y);

View File

@@ -1084,9 +1084,15 @@ _TextAreaWndProc(
case WM_NOTIFY: Handle_WM_Notify(hwnd, (LPNMHDR)lParam);
return TRUE;
#endif
/* Workaround for the problem that MyWindowProc() returns FALSE on 64
* bit windows when cross-compiled using Mingw libraries. (Andy
* Kittner) */
case WM_NCCREATE:
MyWindowProc(hwnd, uMsg, wParam, lParam);
return TRUE;
default:
return MyWindowProc(hwnd, uMsg, wParam, lParam);
default:
return MyWindowProc(hwnd, uMsg, wParam, lParam);
}
}

View File

@@ -889,6 +889,7 @@ validate_cursor_col()
{
colnr_T off;
colnr_T col;
int width;
validate_virtcol();
if (!(curwin->w_valid & VALID_WCOL))
@@ -896,15 +897,14 @@ validate_cursor_col()
col = curwin->w_virtcol;
off = curwin_col_off();
col += off;
width = W_WIDTH(curwin) - off + curwin_col_off2();
/* long line wrapping, adjust curwin->w_wrow */
if (curwin->w_p_wrap
&& col >= (colnr_T)W_WIDTH(curwin)
&& W_WIDTH(curwin) - off + curwin_col_off2() > 0)
{
col -= W_WIDTH(curwin);
col = col % (W_WIDTH(curwin) - off + curwin_col_off2());
}
&& width > 0)
/* use same formula as what is used in curs_columns() */
col -= ((col - W_WIDTH(curwin)) / width + 1) * width;
if (col > (int)curwin->w_leftcol)
col -= curwin->w_leftcol;
else
@@ -1041,6 +1041,7 @@ curs_columns(scroll)
/* long line wrapping, adjust curwin->w_wrow */
if (curwin->w_wcol >= W_WIDTH(curwin))
{
/* this same formula is used in validate_cursor_col() */
n = (curwin->w_wcol - W_WIDTH(curwin)) / width + 1;
curwin->w_wcol -= n * width;
curwin->w_wrow += n;

View File

@@ -24,6 +24,8 @@ void profile_sub_wait __ARGS((proftime_T *tm, proftime_T *tma));
int profile_equal __ARGS((proftime_T *tm1, proftime_T *tm2));
int profile_cmp __ARGS((proftime_T *tm1, proftime_T *tm2));
void ex_profile __ARGS((exarg_T *eap));
char_u *get_profile_name __ARGS((expand_T *xp, int idx));
void set_context_in_profile_cmd __ARGS((expand_T *xp, char_u *arg));
void profile_dump __ARGS((void));
void script_prof_save __ARGS((proftime_T *tm));
void script_prof_restore __ARGS((proftime_T *tm));

View File

@@ -2335,13 +2335,12 @@ fold_line(wp, fold_count, foldinfo, lnum, row)
if (cells > 1)
ScreenLines[idx + 1] = 0;
}
else if (cells > 1) /* double-byte character */
{
if (enc_dbcs == DBCS_JPNU && *p == 0x8e)
ScreenLines2[idx] = p[1];
else
ScreenLines[idx + 1] = p[1];
}
else if (enc_dbcs == DBCS_JPNU && *p == 0x8e)
/* double-byte single width character */
ScreenLines2[idx] = p[1];
else if (cells > 1)
/* double-width character */
ScreenLines[idx + 1] = p[1];
col += cells;
idx += cells;
p += c_len;
@@ -4631,7 +4630,11 @@ win_line(wp, lnum, startrow, endrow, nochange)
ScreenLines[off] = c;
#ifdef FEAT_MBYTE
if (enc_dbcs == DBCS_JPNU)
{
if ((mb_c & 0xff00) == 0x8e00)
ScreenLines[off] = 0x8e;
ScreenLines2[off] = mb_c & 0xff;
}
else if (enc_utf8)
{
if (mb_utf8)

View File

@@ -681,6 +681,20 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
355,
/**/
354,
/**/
353,
/**/
352,
/**/
351,
/**/
350,
/**/
349,
/**/
348,
/**/

View File

@@ -718,6 +718,7 @@ extern char *(*dyn_libintl_textdomain)(const char *domainname);
#define EXPAND_SHELLCMD 32
#define EXPAND_CSCOPE 33
#define EXPAND_SIGN 34
#define EXPAND_PROFILE 35
/* Values for exmode_active (0 is no exmode) */
#define EXMODE_NORMAL 1

View File

@@ -626,7 +626,7 @@ wingotofile:
#ifdef FEAT_SEARCHPATH
case 'f': /* CTRL-W gf: "gf" in a new tab page */
case 'F': /* CTRL-W gF: "gF" in a new tab page */
cmdmod.tab = TRUE;
cmdmod.tab = tabpage_index(curtab) + 1;
nchar = xchar;
goto wingotofile;
#endif