Skip to content

Commit a49a03b

Browse files
committed
merged with vim74-kaoriya-win64-20130811
1 parent fbb426b commit a49a03b

File tree

6 files changed

+40
-45
lines changed

6 files changed

+40
-45
lines changed

src/GvimExt/gvimext.cpp

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -105,30 +105,6 @@ getGvimNameW(wchar_t *nameW)
105105
getRuntimeDir(char *buf)
106106
{
107107
int idx;
108-
HKEY hkey;
109-
110-
/*
111-
* Get runtime path from the registry if entry exists.
112-
*/
113-
if (RegOpenKeyEx(HKEY_LOCAL_MACHINE, "Software\\Vim\\Gvim", 0,
114-
KEY_READ, &hkey) == ERROR_SUCCESS)
115-
{
116-
DWORD dwLen = MAX_PATH;
117-
LONG result = RegQueryValueEx(hkey, "runtime", 0, NULL, (BYTE*)buf,
118-
&dwLen);
119-
120-
RegCloseKey(hkey);
121-
if (result == ERROR_SUCCESS)
122-
{
123-
/* Add directory separater if needs */
124-
if (dwLen > 1 && !strchr("\\/", buf[dwLen - 2]))
125-
{
126-
buf[dwLen - 1] = '\\';
127-
buf[dwLen ] = '\0';
128-
}
129-
return; /* success to obtain runtime entry */
130-
}
131-
}
132108

133109
getGvimName(buf, 1);
134110
if (buf[0] != 0)

src/ex_getln.c

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5442,13 +5442,6 @@ in_history(type, str, move_to_front, sep, writing)
54425442
&& !(writing && history[type][i].viminfo)
54435443
&& (type != HIST_SEARCH || sep == p[STRLEN(p) + 1]))
54445444
{
5445-
char_u *p = history[type][i].hisstr;
5446-
5447-
/* For search history, equation check includes first characters
5448-
* equation. */
5449-
if (type == HIST_SEARCH && sep != p[STRLEN(p) + 1])
5450-
break;
5451-
54525445
if (!move_to_front)
54535446
return TRUE;
54545447
last_i = i;

src/gui_w32.c

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,11 @@
2525

2626
#include "vim.h"
2727

28-
#if defined(FEAT_DIRECTX)
28+
#ifdef FEAT_DIRECTX
2929
# include "gui_dwrite.h"
3030
#endif
3131

32-
#if defined(FEAT_DIRECTX)
32+
#ifdef FEAT_DIRECTX
3333
static DWriteContext *s_dwc = NULL;
3434
static int s_directx_enabled = 0;
3535
static int s_directx_load_attempted = 0;
@@ -74,7 +74,7 @@ gui_mch_set_rendering_options(char_u *s)
7474
char_u name[128];
7575
char_u value[128];
7676

77-
copy_option_part(&p, item, sizeof(item), ",");
77+
copy_option_part(&p, item, sizeof(item), ",");
7878
if (p == NULL)
7979
break;
8080
q = &item[0];
@@ -1906,7 +1906,7 @@ gui_mch_set_shellsize(int width, int height,
19061906
GetSystemMetrics(SM_CXPADDEDBORDER)) * 2;
19071907
win_height = height + (GetSystemMetrics(SM_CYFRAME) +
19081908
GetSystemMetrics(SM_CXPADDEDBORDER)) * 2
1909-
+ GetSystemMetrics(SM_CYCAPTION)
1909+
+ get_caption_height()
19101910
#ifdef FEAT_MENU
19111911
+ gui_mswin_get_menu_height(FALSE)
19121912
#endif
@@ -2625,7 +2625,7 @@ gui_mch_draw_string(
26252625
if (text[n] >= 0x80)
26262626
break;
26272627

2628-
#if defined(FEAT_DIRECTX)
2628+
#ifdef FEAT_DIRECTX
26292629
/* Quick hack to enable DirectWrite. To use DirectWrite (antialias), it is
26302630
* required that unicode drawing routine, currently. So this forces it
26312631
* enabled. */
@@ -2691,14 +2691,14 @@ gui_mch_draw_string(
26912691
i += utfc_ptr2len_len(text + i, len - i);
26922692
++clen;
26932693
}
2694-
#if defined(FEAT_DIRECTX)
2694+
#ifdef FEAT_DIRECTX
26952695
if (IS_ENABLE_DIRECTX() && font_is_ttf_or_vector)
26962696
{
26972697
DWriteContext_DrawText(s_dwc, s_hdc, unicodebuf, wlen,
26982698
TEXT_X(col), TEXT_Y(row), FILL_X(cells), FILL_Y(1),
26992699
gui.char_width, gui.currFgColor);
27002700
}
2701-
else
2701+
else
27022702
#endif
27032703
ExtTextOutW(s_hdc, TEXT_X(col), TEXT_Y(row),
27042704
foptions, pcliprect, unicodebuf, wlen, unicodepdy);
@@ -2839,7 +2839,7 @@ gui_mch_get_screen_dimensions(int *screen_w, int *screen_h)
28392839
*screen_h = workarea_rect.bottom - workarea_rect.top
28402840
- (GetSystemMetrics(SM_CYFRAME) +
28412841
GetSystemMetrics(SM_CXPADDEDBORDER)) * 2
2842-
- GetSystemMetrics(SM_CYCAPTION)
2842+
- get_caption_height()
28432843
#ifdef FEAT_MENU
28442844
- gui_mswin_get_menu_height(FALSE)
28452845
#endif

src/gui_w48.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2786,7 +2786,7 @@ _OnPaint(
27862786

27872787
out_flush(); /* make sure all output has been processed */
27882788
(void)BeginPaint(hwnd, &ps);
2789-
#if defined(FEAT_DIRECTX)
2789+
#ifdef FEAT_DIRECTX
27902790
if (IS_ENABLE_DIRECTX())
27912791
DWriteContext_BeginDraw(s_dwc);
27922792
#endif
@@ -2806,7 +2806,7 @@ _OnPaint(
28062806

28072807
if (!IsRectEmpty(&ps.rcPaint))
28082808
{
2809-
#if defined(FEAT_DIRECTX)
2809+
#ifdef FEAT_DIRECTX
28102810
if (IS_ENABLE_DIRECTX())
28112811
DWriteContext_BindDC(s_dwc, s_hdc, &ps.rcPaint);
28122812
#endif
@@ -2815,7 +2815,7 @@ _OnPaint(
28152815
ps.rcPaint.bottom - ps.rcPaint.top + 1);
28162816
}
28172817

2818-
#if defined(FEAT_DIRECTX)
2818+
#ifdef FEAT_DIRECTX
28192819
if (IS_ENABLE_DIRECTX())
28202820
DWriteContext_EndDraw(s_dwc);
28212821
#endif
@@ -2936,7 +2936,7 @@ gui_mswin_get_valid_dimensions(
29362936
base_height = gui_get_base_height()
29372937
+ (GetSystemMetrics(SM_CYFRAME) +
29382938
GetSystemMetrics(SM_CXPADDEDBORDER)) * 2
2939-
+ GetSystemMetrics(SM_CYCAPTION)
2939+
+ get_caption_height()
29402940
#ifdef FEAT_MENU
29412941
+ gui_mswin_get_menu_height(FALSE)
29422942
#endif
@@ -3059,7 +3059,7 @@ gui_mch_insert_lines(
30593059
void
30603060
gui_mch_exit(int rc)
30613061
{
3062-
#if defined(FEAT_DIRECTX)
3062+
#ifdef FEAT_DIRECTX
30633063
DWriteContext_Close(s_dwc);
30643064
DWrite_Final();
30653065
s_dwc = NULL;
@@ -3309,7 +3309,7 @@ gui_mch_newfont()
33093309
rect.bottom - rect.top
33103310
- (GetSystemMetrics(SM_CYFRAME) +
33113311
GetSystemMetrics(SM_CXPADDEDBORDER)) * 2
3312-
- GetSystemMetrics(SM_CYCAPTION)
3312+
- get_caption_height()
33133313
#ifdef FEAT_MENU
33143314
- gui_mswin_get_menu_height(FALSE)
33153315
#endif

src/mbyte.c

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4478,7 +4478,22 @@ im_set_active(int active)
44784478
im_is_active = (active && !p_imdisable);
44794479

44804480
if (im_is_active != was_active)
4481+
{
4482+
# ifdef FEAT_EVAL
4483+
if (p_imaf[0] != NUL)
4484+
{
4485+
char_u *argv[1];
4486+
4487+
if (active)
4488+
argv[0] = (char_u *)"1";
4489+
else
4490+
argv[0] = (char_u *)"0";
4491+
(void)call_func_retnr(p_imaf, 1, argv, FALSE);
4492+
return;
4493+
}
4494+
# endif
44814495
xim_reset();
4496+
}
44824497
}
44834498

44844499
void

src/ui.c

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3262,6 +3262,17 @@ ui_focus_change(in_focus)
32623262
im_save_status(psave)
32633263
long *psave;
32643264
{
3265+
# if defined(FEAT_EVAL) && defined(FEAT_XIM) && defined(FEAT_GUI_GTK)
3266+
if (!p_imdisable && KeyTyped && !KeyStuffed && p_imsf[0] != NUL)
3267+
{
3268+
if (vgetc_im_active)
3269+
*psave = B_IMODE_IM;
3270+
else if (*psave == B_IMODE_IM)
3271+
*psave = B_IMODE_NONE;
3272+
return;
3273+
}
3274+
# endif
3275+
32653276
/* Don't save when 'imdisable' is set or "xic" is NULL, IM is always
32663277
* disabled then (but might start later).
32673278
* Also don't save when inside a mapping, vgetc_im_active has not been set

0 commit comments

Comments
 (0)