Skip to content

Commit 8a5c995

Browse files
committed
Merge branch 'kaoriya' into master-update
Conflicts: plugins/vimproc/autoload/vimproc.vim plugins/vimproc/autoload/vimproc_win64.dll plugins/vimproc/doc/vimproc.txt src/mbyte.c src/misc2.c src/option.c
2 parents a492617 + 1e464c7 commit 8a5c995

File tree

2 files changed

+34
-10
lines changed

2 files changed

+34
-10
lines changed

src/auto/configure

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5846,6 +5846,14 @@ $as_echo "OK" >&6; }
58465846
vi_cv_perlsitelib=`$vi_cv_path_perl -MConfig -e 'print $Config{sitelibexp}'`
58475847

58485848

5849+
vi_cv_perl_extutils=unknown_perl_extutils_path
5850+
for extutils_rel_path in ExtUtils vendor_perl/ExtUtils; do
5851+
xsubpp_path="$vi_cv_perllib/$extutils_rel_path/xsubpp"
5852+
if test -f "$xsubpp_path"; then
5853+
vi_cv_perl_xsubpp="$xsubpp_path"
5854+
fi
5855+
done
5856+
58495857
vi_cv_perl_extutils=unknown_perl_extutils_path
58505858
for extutils_rel_path in ExtUtils vendor_perl/ExtUtils; do
58515859
xsubpp_path="$vi_cv_perllib/$extutils_rel_path/xsubpp"

src/mbyte.c

Lines changed: 26 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4448,9 +4448,6 @@ iconv_end()
44484448
# define g_return_if_fail(x) if (!(x)) return;
44494449
# endif
44504450

4451-
# if defined(FEAT_GUI_GTK) || defined(FEAT_GUI_MACVIM) || defined(PROTO)
4452-
static int xim_has_preediting INIT(= FALSE); /* IM current status */
4453-
44544451
static int im_is_active = FALSE; /* IM is enabled for current mode */
44554452
static int preedit_is_active = FALSE;
44564453

@@ -4463,6 +4460,11 @@ static unsigned int im_activatekey_state = 0;
44634460
static GtkWidget *preedit_window = NULL;
44644461
static GtkWidget *preedit_label = NULL;
44654462

4463+
static void im_preedit_window_set_position(void);
4464+
4465+
static GtkWidget *preedit_window = NULL;
4466+
static GtkWidget *preedit_label = NULL;
4467+
44664468
static void im_preedit_window_set_position(void);
44674469

44684470
void
@@ -4570,6 +4572,27 @@ im_preedit_window_set_position(void)
45704572
{
45714573
int x, y, w, h, sw, sh;
45724574

4575+
if (preedit_window == NULL)
4576+
return;
4577+
4578+
sw = gdk_screen_get_width(gtk_widget_get_screen(preedit_window));
4579+
sh = gdk_screen_get_height(gtk_widget_get_screen(preedit_window));
4580+
gdk_window_get_origin(gui.drawarea->window, &x, &y);
4581+
gtk_window_get_size(GTK_WINDOW(preedit_window), &w, &h);
4582+
x = x + FILL_X(gui.col);
4583+
y = y + FILL_Y(gui.row);
4584+
if (x + w > sw)
4585+
x = sw - w;
4586+
if (y + h > sh)
4587+
y = sh - h;
4588+
gtk_window_move(GTK_WINDOW(preedit_window), x, y);
4589+
}
4590+
4591+
static void
4592+
im_preedit_window_set_position(void)
4593+
{
4594+
int x, y, w, h, sw, sh;
4595+
45734596
if (preedit_window == NULL)
45744597
return;
45754598

@@ -4856,13 +4879,6 @@ im_preedit_changed_macvim(char *preedit_string, int start_index, int cursor_inde
48564879
xim_has_preediting = TRUE;
48574880
im_show_preedit();
48584881
}
4859-
4860-
# ifndef FEAT_GUI_MACVIM
4861-
g_free(preedit_string);
4862-
4863-
if (gtk_main_level() > 0)
4864-
gtk_main_quit();
4865-
# endif
48664882
}
48674883

48684884
void

0 commit comments

Comments
 (0)