0
0
mirror of https://github.com/vim/vim.git synced 2025-08-27 20:13:38 -04:00

patch 9.0.1158: code is indented more than necessary

Problem:    Code is indented more than necessary.
Solution:   Use an early return where it makes sense. (Yegappan Lakshmanan,
            closes #11787)
This commit is contained in:
Yegappan Lakshmanan 2023-01-08 13:44:24 +00:00 committed by Bram Moolenaar
parent df8f947359
commit 7f8b2559a3
14 changed files with 1274 additions and 1266 deletions

View File

@ -1426,12 +1426,12 @@ ff_push(ff_search_ctx_T *search_ctx, ff_stack_T *stack_ptr)
{ {
// check for NULL pointer, not to return an error to the user, but // check for NULL pointer, not to return an error to the user, but
// to prevent a crash // to prevent a crash
if (stack_ptr != NULL) if (stack_ptr == NULL)
{ return;
stack_ptr->ffs_prev = search_ctx->ffsc_stack_ptr; stack_ptr->ffs_prev = search_ctx->ffsc_stack_ptr;
search_ctx->ffsc_stack_ptr = stack_ptr; search_ctx->ffsc_stack_ptr = stack_ptr;
} }
}
/* /*
* Pop a dir from the directory stack. * Pop a dir from the directory stack.

View File

@ -513,14 +513,15 @@ newFoldLevelWin(win_T *wp)
void void
foldCheckClose(void) foldCheckClose(void)
{ {
if (*p_fcl != NUL) // can only be "all" right now if (*p_fcl == NUL)
{ return;
// can only be "all" right now
checkupdate(curwin); checkupdate(curwin);
if (checkCloseRec(&curwin->w_folds, curwin->w_cursor.lnum, if (checkCloseRec(&curwin->w_folds, curwin->w_cursor.lnum,
(int)curwin->w_p_fdl)) (int)curwin->w_p_fdl))
changed_window_setting(); changed_window_setting();
} }
}
// checkCloseRec() {{{2 // checkCloseRec() {{{2
static int static int
@ -1077,8 +1078,10 @@ foldAdjustVisual(void)
} }
if (hasFolding(start->lnum, &start->lnum, NULL)) if (hasFolding(start->lnum, &start->lnum, NULL))
start->col = 0; start->col = 0;
if (hasFolding(end->lnum, NULL, &end->lnum))
{ if (!hasFolding(end->lnum, NULL, &end->lnum))
return;
ptr = ml_get(end->lnum); ptr = ml_get(end->lnum);
end->col = (colnr_T)STRLEN(ptr); end->col = (colnr_T)STRLEN(ptr);
if (end->col > 0 && *p_sel == 'o') if (end->col > 0 && *p_sel == 'o')
@ -1087,7 +1090,6 @@ foldAdjustVisual(void)
if (has_mbyte) if (has_mbyte)
mb_adjust_cursor(); mb_adjust_cursor();
} }
}
// cursor_foldstart() {{{2 // cursor_foldstart() {{{2
/* /*
@ -1215,12 +1217,12 @@ foldLevelWin(win_T *wp, linenr_T lnum)
static void static void
checkupdate(win_T *wp) checkupdate(win_T *wp)
{ {
if (wp->w_foldinvalid) if (!wp->w_foldinvalid)
{ return;
foldUpdate(wp, (linenr_T)1, (linenr_T)MAXLNUM); // will update all foldUpdate(wp, (linenr_T)1, (linenr_T)MAXLNUM); // will update all
wp->w_foldinvalid = FALSE; wp->w_foldinvalid = FALSE;
} }
}
// setFoldRepeat() {{{2 // setFoldRepeat() {{{2
/* /*

View File

@ -259,12 +259,12 @@ delete_buff_tail(buffheader_T *buf, int slen)
if (buf->bh_curr == NULL) if (buf->bh_curr == NULL)
return; // nothing to delete return; // nothing to delete
len = (int)STRLEN(buf->bh_curr->b_str); len = (int)STRLEN(buf->bh_curr->b_str);
if (len >= slen) if (len < slen)
{ return;
buf->bh_curr->b_str[len - slen] = NUL; buf->bh_curr->b_str[len - slen] = NUL;
buf->bh_space += slen; buf->bh_space += slen;
} }
}
/* /*
* Add number "n" to buffer "buf". * Add number "n" to buffer "buf".
@ -478,13 +478,13 @@ flush_buffers(flush_buffers_T flush_typeahead)
void void
ResetRedobuff(void) ResetRedobuff(void)
{ {
if (!block_redo) if (block_redo)
{ return;
free_buff(&old_redobuff); free_buff(&old_redobuff);
old_redobuff = redobuff; old_redobuff = redobuff;
redobuff.bh_first.b_next = NULL; redobuff.bh_first.b_next = NULL;
} }
}
/* /*
* Discard the contents of the redo buffer and restore the previous redo * Discard the contents of the redo buffer and restore the previous redo
@ -493,8 +493,9 @@ ResetRedobuff(void)
void void
CancelRedo(void) CancelRedo(void)
{ {
if (!block_redo) if (block_redo)
{ return;
free_buff(&redobuff); free_buff(&redobuff);
redobuff = old_redobuff; redobuff = old_redobuff;
old_redobuff.bh_first.b_next = NULL; old_redobuff.bh_first.b_next = NULL;
@ -502,7 +503,6 @@ CancelRedo(void)
while (read_readbuffers(TRUE) != NUL) while (read_readbuffers(TRUE) != NUL)
; ;
} }
}
/* /*
* Save redobuff and old_redobuff to save_redobuff and save_old_redobuff. * Save redobuff and old_redobuff to save_redobuff and save_old_redobuff.
@ -520,12 +520,12 @@ saveRedobuff(save_redo_T *save_redo)
// Make a copy, so that ":normal ." in a function works. // Make a copy, so that ":normal ." in a function works.
s = get_buffcont(&save_redo->sr_redobuff, FALSE); s = get_buffcont(&save_redo->sr_redobuff, FALSE);
if (s != NULL) if (s == NULL)
{ return;
add_buff(&redobuff, s, -1L); add_buff(&redobuff, s, -1L);
vim_free(s); vim_free(s);
} }
}
/* /*
* Restore redobuff and old_redobuff from save_redobuff and save_old_redobuff. * Restore redobuff and old_redobuff from save_redobuff and save_old_redobuff.
@ -944,8 +944,9 @@ stop_redo_ins(void)
static void static void
init_typebuf(void) init_typebuf(void)
{ {
if (typebuf.tb_buf == NULL) if (typebuf.tb_buf != NULL)
{ return;
typebuf.tb_buf = typebuf_init; typebuf.tb_buf = typebuf_init;
typebuf.tb_noremap = noremapbuf_init; typebuf.tb_noremap = noremapbuf_init;
typebuf.tb_buflen = TYPELEN_INIT; typebuf.tb_buflen = TYPELEN_INIT;
@ -953,7 +954,6 @@ init_typebuf(void)
typebuf.tb_off = MAXMAPLEN + 4; typebuf.tb_off = MAXMAPLEN + 4;
typebuf.tb_change_cnt = 1; typebuf.tb_change_cnt = 1;
} }
}
/* /*
* Returns TRUE when keys cannot be remapped. * Returns TRUE when keys cannot be remapped.
@ -1324,12 +1324,12 @@ gotchars(char_u *chars, int len)
void void
ungetchars(int len) ungetchars(int len)
{ {
if (reg_recording != 0) if (reg_recording == 0)
{ return;
delete_buff_tail(&recordbuff, len); delete_buff_tail(&recordbuff, len);
last_recorded_len -= len; last_recorded_len -= len;
} }
}
/* /*
* Sync undo. Called when typed characters are obtained from the typeahead * Sync undo. Called when typed characters are obtained from the typeahead
@ -2230,8 +2230,9 @@ f_getcharstr(typval_T *argvars, typval_T *rettv)
{ {
getchar_common(argvars, rettv); getchar_common(argvars, rettv);
if (rettv->v_type == VAR_NUMBER) if (rettv->v_type != VAR_NUMBER)
{ return;
char_u temp[7]; // mbyte-char: 6, NUL: 1 char_u temp[7]; // mbyte-char: 6, NUL: 1
varnumber_T n = rettv->vval.v_number; varnumber_T n = rettv->vval.v_number;
int i = 0; int i = 0;
@ -2247,7 +2248,6 @@ f_getcharstr(typval_T *argvars, typval_T *rettv)
rettv->v_type = VAR_STRING; rettv->v_type = VAR_STRING;
rettv->vval.v_string = vim_strsave(temp); rettv->vval.v_string = vim_strsave(temp);
} }
}
/* /*
* "getcharmod()" function * "getcharmod()" function
@ -4031,10 +4031,10 @@ do_cmdkey_command(int key UNUSED, int flags)
void void
reset_last_used_map(mapblock_T *mp) reset_last_used_map(mapblock_T *mp)
{ {
if (last_used_map == mp) if (last_used_map != mp)
{ return;
last_used_map = NULL; last_used_map = NULL;
last_used_sid = -1; last_used_sid = -1;
} }
}
#endif #endif

View File

@ -1171,9 +1171,11 @@ gui_update_cursor(
return; return;
gui_check_pos(); gui_check_pos();
if (!gui.cursor_is_valid || force
|| gui.row != gui.cursor_row || gui.col != gui.cursor_col) if (gui.cursor_is_valid && !force
{ && gui.row == gui.cursor_row && gui.col == gui.cursor_col)
return;
gui_undraw_cursor(); gui_undraw_cursor();
// If a cursor-less sleep is ongoing, leave the cursor invisible // If a cursor-less sleep is ongoing, leave the cursor invisible
@ -1393,7 +1395,6 @@ gui_update_cursor(
} }
gui.highlight_mask = old_hl_mask; gui.highlight_mask = old_hl_mask;
} }
}
#if defined(FEAT_MENU) || defined(PROTO) #if defined(FEAT_MENU) || defined(PROTO)
static void static void
@ -2054,14 +2055,14 @@ gui_write(
void void
gui_dont_update_cursor(int undraw) gui_dont_update_cursor(int undraw)
{ {
if (gui.in_use) if (!gui.in_use)
{ return;
// Undraw the cursor now, we probably can't do it after the change. // Undraw the cursor now, we probably can't do it after the change.
if (undraw) if (undraw)
gui_undraw_cursor(); gui_undraw_cursor();
can_update_cursor = FALSE; can_update_cursor = FALSE;
} }
}
void void
gui_can_update_cursor(void) gui_can_update_cursor(void)
@ -2679,8 +2680,9 @@ gui_outstr_nowrap(
void void
gui_undraw_cursor(void) gui_undraw_cursor(void)
{ {
if (gui.cursor_is_valid) if (!gui.cursor_is_valid)
{ return;
// Always redraw the character just before if there is one, because // Always redraw the character just before if there is one, because
// with some fonts and characters there can be a one pixel overlap. // with some fonts and characters there can be a one pixel overlap.
int startcol = gui.cursor_col > 0 ? gui.cursor_col - 1 : gui.cursor_col; int startcol = gui.cursor_col > 0 ? gui.cursor_col - 1 : gui.cursor_col;
@ -2696,7 +2698,6 @@ gui_undraw_cursor(void)
// here in case it wasn't needed to undraw it. // here in case it wasn't needed to undraw it.
gui.cursor_is_valid = FALSE; gui.cursor_is_valid = FALSE;
} }
}
void void
gui_redraw( gui_redraw(
@ -3559,8 +3560,9 @@ gui_init_which_components(char_u *oldval UNUSED)
break; break;
} }
if (gui.in_use) if (!gui.in_use)
{ return;
need_set_size = 0; need_set_size = 0;
fix_size = FALSE; fix_size = FALSE;
@ -3690,7 +3692,6 @@ gui_init_which_components(char_u *oldval UNUSED)
if (firstwin->w_winrow != tabline_height()) if (firstwin->w_winrow != tabline_height())
shell_new_rows(); // recompute window positions and heights shell_new_rows(); // recompute window positions and heights
} }
}
#if defined(FEAT_GUI_TABLINE) || defined(PROTO) #if defined(FEAT_GUI_TABLINE) || defined(PROTO)
/* /*
@ -4768,7 +4769,7 @@ gui_mouse_focus(int x, int y)
return; return;
/* /*
* format a mouse click on status line input * Format a mouse click on status line input,
* ala gui_send_mouse_event(0, x, y, 0, 0); * ala gui_send_mouse_event(0, x, y, 0, 0);
* Trick: Use a column number -1, so that get_pseudo_mouse_code() will * Trick: Use a column number -1, so that get_pseudo_mouse_code() will
* generate a K_LEFTMOUSE_NM key code. * generate a K_LEFTMOUSE_NM key code.
@ -4852,14 +4853,15 @@ gui_mouse_correct(void)
need_mouse_correct = FALSE; need_mouse_correct = FALSE;
wp = gui_mouse_window(IGNORE_POPUP); wp = gui_mouse_window(IGNORE_POPUP);
if (wp != curwin && wp != NULL) // If in other than current window if (wp == curwin || wp == NULL)
{ return;
// If in other than current window
validate_cline_row(); validate_cline_row();
gui_mch_setmouse((int)W_ENDCOL(curwin) * gui.char_width - 3, gui_mch_setmouse((int)W_ENDCOL(curwin) * gui.char_width - 3,
(W_WINROW(curwin) + curwin->w_wrow) * gui.char_height (W_WINROW(curwin) + curwin->w_wrow) * gui.char_height
+ (gui.char_height) / 2); + (gui.char_height) / 2);
} }
}
/* /*
* Find window where the mouse pointer "x" / "y" coordinate is in. * Find window where the mouse pointer "x" / "y" coordinate is in.
@ -5014,9 +5016,14 @@ display_errors(void)
char_u *p; char_u *p;
if (isatty(2)) if (isatty(2))
fflush(stderr);
else if (error_ga.ga_data != NULL)
{ {
fflush(stderr);
return;
}
if (error_ga.ga_data == NULL)
return;
// avoid putting up a message box with blanks only // avoid putting up a message box with blanks only
for (p = (char_u *)error_ga.ga_data; *p != NUL; ++p) for (p = (char_u *)error_ga.ga_data; *p != NUL; ++p)
if (!isspace(*p)) if (!isspace(*p))
@ -5030,7 +5037,6 @@ display_errors(void)
} }
ga_clear(&error_ga); ga_clear(&error_ga);
} }
}
#endif #endif
#if defined(NO_CONSOLE_INPUT) || defined(PROTO) #if defined(NO_CONSOLE_INPUT) || defined(PROTO)
@ -5339,13 +5345,13 @@ gui_wingoto_xy(int x, int y)
int col = X_2_COL(x); int col = X_2_COL(x);
win_T *wp; win_T *wp;
if (row >= 0 && col >= 0) if (row < 0 || col < 0)
{ return;
wp = mouse_find_win(&row, &col, FAIL_POPUP); wp = mouse_find_win(&row, &col, FAIL_POPUP);
if (wp != NULL && wp != curwin) if (wp != NULL && wp != curwin)
win_goto(wp); win_goto(wp);
} }
}
/* /*
* Function passed to handle_drop() for the actions to be done after the * Function passed to handle_drop() for the actions to be done after the

View File

@ -373,8 +373,9 @@ pointer_event(BalloonEval *beval, int x, int y, unsigned state)
distance = ABS(x - beval->x) + ABS(y - beval->y); distance = ABS(x - beval->x) + ABS(y - beval->y);
if (distance > 4) if (distance <= 4)
{ return;
/* /*
* Moved out of the balloon location: cancel it. * Moved out of the balloon location: cancel it.
* Remember button state * Remember button state
@ -408,7 +409,6 @@ pointer_event(BalloonEval *beval, int x, int y, unsigned state)
} }
} }
} }
}
static void static void
key_event(BalloonEval *beval, unsigned keyval, int is_keypress) key_event(BalloonEval *beval, unsigned keyval, int is_keypress)
@ -698,8 +698,9 @@ timerRoutine(XtPointer dx, XtIntervalId *id UNUSED)
static void static void
requestBalloon(BalloonEval *beval) requestBalloon(BalloonEval *beval)
{ {
if (beval->showState != ShS_PENDING) if (beval->showState == ShS_PENDING)
{ return;
// Determine the beval to display // Determine the beval to display
if (beval->msgCB != NULL) if (beval->msgCB != NULL)
{ {
@ -709,7 +710,6 @@ requestBalloon(BalloonEval *beval)
else if (beval->msg != NULL) else if (beval->msg != NULL)
drawBalloon(beval); drawBalloon(beval);
} }
}
#ifdef FEAT_GUI_GTK #ifdef FEAT_GUI_GTK
/* /*
@ -900,8 +900,9 @@ set_printable_label_text(GtkLabel *label, char_u *text)
static void static void
drawBalloon(BalloonEval *beval) drawBalloon(BalloonEval *beval)
{ {
if (beval->msg != NULL) if (beval->msg == NULL)
{ return;
GtkRequisition requisition; GtkRequisition requisition;
int screen_w; int screen_w;
int screen_h; int screen_h;
@ -979,7 +980,6 @@ drawBalloon(BalloonEval *beval)
beval->showState = ShS_SHOWING; beval->showState = ShS_SHOWING;
gui_mch_update(); gui_mch_update();
} }
}
/* /*
* Undraw a balloon. * Undraw a balloon.
@ -1060,8 +1060,9 @@ drawBalloon(BalloonEval *beval)
Position tx; Position tx;
Position ty; Position ty;
if (beval->msg != NULL) if (beval->msg == NULL)
{ return;
XmString s; XmString s;
// Show the Balloon // Show the Balloon
@ -1119,7 +1120,6 @@ drawBalloon(BalloonEval *beval)
current_beval = beval; current_beval = beval;
} }
}
/* /*
* Undraw a balloon. * Undraw a balloon.
@ -1161,7 +1161,6 @@ createBalloonEvalWindow(BalloonEval *beval)
beval->balloonShell = XtAppCreateShell("balloonEval", "BalloonEval", beval->balloonShell = XtAppCreateShell("balloonEval", "BalloonEval",
overrideShellWidgetClass, gui.dpy, args, n); overrideShellWidgetClass, gui.dpy, args, n);
{
XmFontList fl; XmFontList fl;
n = 0; n = 0;
@ -1173,7 +1172,6 @@ createBalloonEvalWindow(BalloonEval *beval)
beval->balloonLabel = XtCreateManagedWidget("balloonLabel", beval->balloonLabel = XtCreateManagedWidget("balloonLabel",
xmLabelWidgetClass, beval->balloonShell, args, n); xmLabelWidgetClass, beval->balloonShell, args, n);
} }
}
#endif // !FEAT_GUI_GTK #endif // !FEAT_GUI_GTK
#endif // !FEAT_GUI_MSWIN #endif // !FEAT_GUI_MSWIN

View File

@ -924,8 +924,9 @@ get_menu_position(vimmenu_T *menu)
void void
gui_mch_menu_set_tip(vimmenu_T *menu) gui_mch_menu_set_tip(vimmenu_T *menu)
{ {
if (menu->id != NULL && menu->parent != NULL && gui.toolbar != NULL) if (menu->id == NULL || menu->parent == NULL || gui.toolbar == NULL)
{ return;
char_u *tooltip; char_u *tooltip;
tooltip = CONVERT_TO_UTF8(menu->strings[MENU_INDEX_TIP]); tooltip = CONVERT_TO_UTF8(menu->strings[MENU_INDEX_TIP]);
@ -940,7 +941,6 @@ gui_mch_menu_set_tip(vimmenu_T *menu)
# endif # endif
CONVERT_TO_UTF8_FREE(tooltip); CONVERT_TO_UTF8_FREE(tooltip);
} }
}
#endif // FEAT_TOOLBAR #endif // FEAT_TOOLBAR
@ -1007,8 +1007,9 @@ gui_mch_destroy_menu(vimmenu_T *menu)
void void
gui_mch_set_scrollbar_thumb(scrollbar_T *sb, long val, long size, long max) gui_mch_set_scrollbar_thumb(scrollbar_T *sb, long val, long size, long max)
{ {
if (sb->id != NULL) if (sb->id == NULL)
{ return;
GtkAdjustment *adjustment; GtkAdjustment *adjustment;
// ignore events triggered by moving the thumb (happens in GTK 3) // ignore events triggered by moving the thumb (happens in GTK 3)
@ -1035,7 +1036,6 @@ gui_mch_set_scrollbar_thumb(scrollbar_T *sb, long val, long size, long max)
g_signal_handler_unblock(G_OBJECT(adjustment), g_signal_handler_unblock(G_OBJECT(adjustment),
(gulong)sb->handler_id); (gulong)sb->handler_id);
} }
}
void void
gui_mch_set_scrollbar_pos(scrollbar_T *sb, int x, int y, int w, int h) gui_mch_set_scrollbar_pos(scrollbar_T *sb, int x, int y, int w, int h)
@ -1157,8 +1157,9 @@ gui_mch_create_scrollbar(scrollbar_T *sb, int orient)
sb->id = gtk_vscrollbar_new(NULL); sb->id = gtk_vscrollbar_new(NULL);
#endif #endif
if (sb->id != NULL) if (sb->id == NULL)
{ return;
GtkAdjustment *adjustment; GtkAdjustment *adjustment;
gtk_widget_set_can_focus(sb->id, FALSE); gtk_widget_set_can_focus(sb->id, FALSE);
@ -1172,7 +1173,6 @@ gui_mch_create_scrollbar(scrollbar_T *sb, int orient)
GINT_TO_POINTER(sb->ident)); GINT_TO_POINTER(sb->ident));
gui_mch_update(); gui_mch_update();
} }
}
void void
gui_mch_destroy_scrollbar(scrollbar_T *sb) gui_mch_destroy_scrollbar(scrollbar_T *sb)
@ -1994,9 +1994,9 @@ gui_make_popup(char_u *path_name, int mouse_pos)
popup_mouse_pos = mouse_pos; popup_mouse_pos = mouse_pos;
menu = gui_find_menu(path_name); menu = gui_find_menu(path_name);
if (menu == NULL || menu->submenu_id == NULL)
return;
if (menu != NULL && menu->submenu_id != NULL)
{
# if GTK_CHECK_VERSION(3,22,2) # if GTK_CHECK_VERSION(3,22,2)
GdkWindow * const win = gtk_widget_get_window(gui.drawarea); GdkWindow * const win = gtk_widget_get_window(gui.drawarea);
GdkEventButton trigger; GdkEventButton trigger;
@ -2047,7 +2047,6 @@ gui_make_popup(char_u *path_name, int mouse_pos)
0U, (guint32)GDK_CURRENT_TIME); 0U, (guint32)GDK_CURRENT_TIME);
# endif # endif
} }
}
#endif // FEAT_MENU #endif // FEAT_MENU

View File

@ -188,15 +188,15 @@ gui_gtk_form_thaw(GtkForm *form)
{ {
g_return_if_fail(GTK_IS_FORM(form)); g_return_if_fail(GTK_IS_FORM(form));
if (form->freeze_count) if (!form->freeze_count)
{ return;
if (!(--form->freeze_count)) if (!(--form->freeze_count))
{ {
form_position_children(form); form_position_children(form);
gtk_widget_queue_draw(GTK_WIDGET(form)); gtk_widget_queue_draw(GTK_WIDGET(form));
} }
} }
}
// Basic Object handling procedures // Basic Object handling procedures
@ -610,8 +610,9 @@ form_remove(GtkContainer *container, GtkWidget *widget)
tmp_list = tmp_list->next; tmp_list = tmp_list->next;
} }
if (tmp_list) if (tmp_list == NULL)
{ return;
#if GTK_CHECK_VERSION(3,0,0) #if GTK_CHECK_VERSION(3,0,0)
const gboolean was_visible = gtk_widget_get_visible(widget); const gboolean was_visible = gtk_widget_get_visible(widget);
#endif #endif
@ -636,7 +637,6 @@ form_remove(GtkContainer *container, GtkWidget *widget)
g_list_free_1(tmp_list); g_list_free_1(tmp_list);
g_free(child); g_free(child);
} }
}
static void static void
form_forall(GtkContainer *container, form_forall(GtkContainer *container,

View File

@ -2435,9 +2435,9 @@ setup_save_yourself(void)
GnomeClient *client; GnomeClient *client;
client = gnome_master_client(); client = gnome_master_client();
if (client == NULL)
return;
if (client != NULL)
{
// Must use the deprecated gtk_signal_connect() for compatibility // Must use the deprecated gtk_signal_connect() for compatibility
// with GNOME 1. Arrgh, zombies! // with GNOME 1. Arrgh, zombies!
gtk_signal_connect(GTK_OBJECT(client), "save_yourself", gtk_signal_connect(GTK_OBJECT(client), "save_yourself",
@ -2445,7 +2445,6 @@ setup_save_yourself(void)
gtk_signal_connect(GTK_OBJECT(client), "die", gtk_signal_connect(GTK_OBJECT(client), "die",
GTK_SIGNAL_FUNC(&sm_client_die), NULL); GTK_SIGNAL_FUNC(&sm_client_die), NULL);
} }
}
#else // !USE_GNOME_SESSION #else // !USE_GNOME_SESSION
@ -3379,14 +3378,14 @@ on_tab_reordered(
gint idx, gint idx,
gpointer data UNUSED) gpointer data UNUSED)
{ {
if (!ignore_tabline_evt) if (ignore_tabline_evt)
{ return;
if ((tabpage_index(curtab) - 1) < idx) if ((tabpage_index(curtab) - 1) < idx)
tabpage_move(idx + 1); tabpage_move(idx + 1);
else else
tabpage_move(idx); tabpage_move(idx);
} }
}
# endif # endif
/* /*
@ -4069,8 +4068,9 @@ gui_mch_init(void)
void void
gui_mch_forked(void) gui_mch_forked(void)
{ {
if (using_gnome) if (!using_gnome)
{ return;
GnomeClient *client; GnomeClient *client;
client = gnome_master_client(); client = gnome_master_client();
@ -4078,7 +4078,6 @@ gui_mch_forked(void)
if (client != NULL) if (client != NULL)
gnome_client_set_process_id(client, getpid()); gnome_client_set_process_id(client, getpid());
} }
}
#endif // USE_GNOME_SESSION #endif // USE_GNOME_SESSION
#if GTK_CHECK_VERSION(3,0,0) #if GTK_CHECK_VERSION(3,0,0)
@ -6860,12 +6859,12 @@ clip_mch_request_selection(Clipboard_T *cbd)
void void
clip_mch_lose_selection(Clipboard_T *cbd UNUSED) clip_mch_lose_selection(Clipboard_T *cbd UNUSED)
{ {
if (!in_selection_clear_event) if (in_selection_clear_event)
{ return;
gtk_selection_owner_set(NULL, cbd->gtk_sel_atom, gui.event_time); gtk_selection_owner_set(NULL, cbd->gtk_sel_atom, gui.event_time);
gui_mch_update(); gui_mch_update();
} }
}
/* /*
* Own the selection and return OK if it worked. * Own the selection and return OK if it worked.
@ -7029,8 +7028,9 @@ static int last_shape = 0;
void void
gui_mch_mousehide(int hide) gui_mch_mousehide(int hide)
{ {
if (gui.pointer_hidden != hide) if (gui.pointer_hidden == hide)
{ return;
gui.pointer_hidden = hide; gui.pointer_hidden = hide;
if (gtk_widget_get_window(gui.drawarea) && gui.blank_pointer != NULL) if (gtk_widget_get_window(gui.drawarea) && gui.blank_pointer != NULL)
{ {
@ -7045,7 +7045,6 @@ gui_mch_mousehide(int hide)
#endif #endif
} }
} }
}
#if defined(FEAT_MOUSESHAPE) || defined(PROTO) #if defined(FEAT_MOUSESHAPE) || defined(PROTO)
@ -7132,9 +7131,10 @@ gui_mch_drawsign(int row, int col, int typenr)
sign = (GdkPixbuf *)sign_get_image(typenr); sign = (GdkPixbuf *)sign_get_image(typenr);
if (sign != NULL && gui.drawarea != NULL if (sign == NULL || gui.drawarea == NULL
&& gtk_widget_get_window(gui.drawarea) != NULL) || gtk_widget_get_window(gui.drawarea) == NULL)
{ return;
int width; int width;
int height; int height;
int xoffset; int xoffset;
@ -7267,7 +7267,6 @@ gui_mch_drawsign(int row, int col, int typenr)
if (need_scale) if (need_scale)
g_object_unref(sign); g_object_unref(sign);
} }
}
void * void *
gui_mch_register_sign(char_u *signfile) gui_mch_register_sign(char_u *signfile)

View File

@ -979,15 +979,15 @@ gui_motif_add_actext(vimmenu_T *menu)
XmString label; XmString label;
// Add accelerator text, if there is one // Add accelerator text, if there is one
if (menu->actext != NULL && menu->id != (Widget)0) if (menu->actext == NULL || menu->id == (Widget)0)
{ return;
label = XmStringCreate((char *)menu->actext, STRING_TAG); label = XmStringCreate((char *)menu->actext, STRING_TAG);
if (label == NULL) if (label == NULL)
return; return;
XtVaSetValues(menu->id, XmNacceleratorText, label, NULL); XtVaSetValues(menu->id, XmNacceleratorText, label, NULL);
XmStringFree(label); XmStringFree(label);
} }
}
void void
gui_mch_toggle_tearoffs(int enable) gui_mch_toggle_tearoffs(int enable)
@ -1573,8 +1573,9 @@ gui_mch_destroy_menu(vimmenu_T *menu)
menu->submenu_id = (Widget)0; menu->submenu_id = (Widget)0;
} }
if (menu->id != (Widget)0) if (menu->id == (Widget)0)
{ return;
Widget parent; Widget parent;
parent = XtParent(menu->id); parent = XtParent(menu->id);
@ -1611,7 +1612,6 @@ gui_mch_destroy_menu(vimmenu_T *menu)
} }
#endif #endif
} }
}
void void
gui_mch_show_popupmenu(vimmenu_T *menu UNUSED) gui_mch_show_popupmenu(vimmenu_T *menu UNUSED)
@ -1630,8 +1630,9 @@ gui_mch_show_popupmenu(vimmenu_T *menu UNUSED)
void void
gui_mch_def_colors(void) gui_mch_def_colors(void)
{ {
if (gui.in_use) if (!gui.in_use)
{ return;
gui.menu_fg_pixel = gui_get_color((char_u *)gui.rsrc_menu_fg_name); gui.menu_fg_pixel = gui_get_color((char_u *)gui.rsrc_menu_fg_name);
gui.menu_bg_pixel = gui_get_color((char_u *)gui.rsrc_menu_bg_name); gui.menu_bg_pixel = gui_get_color((char_u *)gui.rsrc_menu_bg_name);
gui.scroll_fg_pixel = gui_get_color((char_u *)gui.rsrc_scroll_fg_name); gui.scroll_fg_pixel = gui_get_color((char_u *)gui.rsrc_scroll_fg_name);
@ -1643,7 +1644,6 @@ gui_mch_def_colors(void)
gui_get_color((char_u *)gui.rsrc_tooltip_bg_name); gui_get_color((char_u *)gui.rsrc_tooltip_bg_name);
#endif #endif
} }
}
/* /*
@ -1674,8 +1674,9 @@ gui_mch_set_scrollbar_pos(
int w, int w,
int h) int h)
{ {
if (sb->id != (Widget)0) if (sb->id == (Widget)0)
{ return;
if (sb->type == SBAR_LEFT || sb->type == SBAR_RIGHT) if (sb->type == SBAR_LEFT || sb->type == SBAR_RIGHT)
{ {
if (y == 0) if (y == 0)
@ -1698,7 +1699,6 @@ gui_mch_set_scrollbar_pos(
NULL); NULL);
XtManageChild(sb->id); XtManageChild(sb->id);
} }
}
int int
gui_mch_get_scrollbar_xpadding(void) gui_mch_get_scrollbar_xpadding(void)
@ -1732,8 +1732,9 @@ gui_mch_enable_scrollbar(scrollbar_T *sb, int flag)
Arg args[16]; Arg args[16];
int n; int n;
if (sb->id != (Widget)0) if (sb->id == (Widget)0)
{ return;
n = 0; n = 0;
if (flag) if (flag)
{ {
@ -1779,7 +1780,6 @@ gui_mch_enable_scrollbar(scrollbar_T *sb, int flag)
XtUnmanageChild(sb->id); XtUnmanageChild(sb->id);
} }
} }
}
void void
gui_mch_create_scrollbar( gui_mch_create_scrollbar(
@ -1817,9 +1817,9 @@ gui_mch_create_scrollbar(
sb->id = XtCreateWidget("scrollBar", sb->id = XtCreateWidget("scrollBar",
xmScrollBarWidgetClass, textAreaForm, args, n); xmScrollBarWidgetClass, textAreaForm, args, n);
if (sb->id == (Widget)0)
return;
if (sb->id != (Widget)0)
{
gui_mch_set_scrollbar_colors(sb); gui_mch_set_scrollbar_colors(sb);
XtAddCallback(sb->id, XmNvalueChangedCallback, XtAddCallback(sb->id, XmNvalueChangedCallback,
scroll_cb, (XtPointer)sb->ident); scroll_cb, (XtPointer)sb->ident);
@ -1828,7 +1828,6 @@ gui_mch_create_scrollbar(
XtAddEventHandler(sb->id, KeyPressMask, FALSE, gui_x11_key_hit_cb, XtAddEventHandler(sb->id, KeyPressMask, FALSE, gui_x11_key_hit_cb,
(XtPointer)0); (XtPointer)0);
} }
}
void void
gui_mch_destroy_scrollbar(scrollbar_T *sb) gui_mch_destroy_scrollbar(scrollbar_T *sb)

View File

@ -992,8 +992,9 @@ gui_ph_pg_add_buffer(char *name)
char **new_titles = NULL; char **new_titles = NULL;
new_titles = ALLOC_MULT(char *, (num_panels + 1)); new_titles = ALLOC_MULT(char *, (num_panels + 1));
if (new_titles != NULL) if (new_titles == NULL)
{ return;
if (num_panels > 0) if (num_panels > 0)
memcpy(new_titles, panel_titles, num_panels * sizeof(char **)); memcpy(new_titles, panel_titles, num_panels * sizeof(char **));
@ -1005,7 +1006,6 @@ gui_ph_pg_add_buffer(char *name)
vim_free(panel_titles); vim_free(panel_titles);
panel_titles = new_titles; panel_titles = new_titles;
} }
}
static void static void
gui_ph_pg_remove_buffer(char *name) gui_ph_pg_remove_buffer(char *name)
@ -1901,8 +1901,9 @@ mch_set_mouse_shape(int shape)
void void
gui_mch_mousehide(int hide) gui_mch_mousehide(int hide)
{ {
if (gui.pointer_hidden != hide) if (gui.pointer_hidden == hide)
{ return;
gui.pointer_hidden = hide; gui.pointer_hidden = hide;
#ifdef FEAT_MOUSESHAPE #ifdef FEAT_MOUSESHAPE
if (hide) if (hide)
@ -1916,7 +1917,6 @@ gui_mch_mousehide(int hide)
0); 0);
#endif #endif
} }
}
void void
gui_mch_getmouse(int *x, int *y) gui_mch_getmouse(int *x, int *y)

View File

@ -434,13 +434,13 @@ directx_enabled(void)
static void static void
directx_binddc(void) directx_binddc(void)
{ {
if (s_textArea != NULL) if (s_textArea == NULL)
{ return;
RECT rect; RECT rect;
GetClientRect(s_textArea, &rect); GetClientRect(s_textArea, &rect);
DWriteContext_BindDC(s_dwc, s_hdc, &rect); DWriteContext_BindDC(s_dwc, s_hdc, &rect);
} }
}
#endif #endif
extern int current_font_height; // this is in os_mswin.c extern int current_font_height; // this is in os_mswin.c
@ -663,15 +663,15 @@ gui_mswin_rm_blink_timer(void)
{ {
MSG msg; MSG msg;
if (blink_timer != 0) if (blink_timer == 0)
{ return;
KillTimer(NULL, blink_timer); KillTimer(NULL, blink_timer);
// Eat spurious WM_TIMER messages // Eat spurious WM_TIMER messages
while (PeekMessageW(&msg, s_hwnd, WM_TIMER, WM_TIMER, PM_REMOVE)) while (PeekMessageW(&msg, s_hwnd, WM_TIMER, WM_TIMER, PM_REMOVE))
; ;
blink_timer = 0; blink_timer = 0;
} }
}
/* /*
* Stop the cursor blinking. Show the cursor if it wasn't shown. * Stop the cursor blinking. Show the cursor if it wasn't shown.
@ -1034,8 +1034,10 @@ _OnMouseButtonDown(
else else
button = MOUSE_LEFT; button = MOUSE_LEFT;
} }
if (button >= 0)
{ if (button < 0)
return;
repeated_click = ((int)(currentTime - s_prevTime) < p_mouset); repeated_click = ((int)(currentTime - s_prevTime) < p_mouset);
/* /*
@ -1091,7 +1093,6 @@ _OnMouseButtonDown(
s_prevTime = currentTime; s_prevTime = currentTime;
} }
}
static void static void
_OnMouseMoveOrRelease( _OnMouseMoveOrRelease(
@ -1233,8 +1234,9 @@ _OnFindRepl(void)
flags = FRD_REPLACEALL; flags = FRD_REPLACEALL;
} }
if (flags != 0) if (flags == 0)
{ return;
char_u *p, *q; char_u *p, *q;
// Call the generic GUI function to do the actual work. // Call the generic GUI function to do the actual work.
@ -1250,7 +1252,6 @@ _OnFindRepl(void)
vim_free(p); vim_free(p);
vim_free(q); vim_free(q);
} }
}
#endif #endif
static void static void
@ -2932,12 +2933,12 @@ gui_mch_replace_dialog(exarg_T *eap)
void void
gui_mch_mousehide(int hide) gui_mch_mousehide(int hide)
{ {
if (hide != gui.pointer_hidden) if (hide == gui.pointer_hidden)
{ return;
ShowCursor(!hide); ShowCursor(!hide);
gui.pointer_hidden = hide; gui.pointer_hidden = hide;
} }
}
#ifdef FEAT_MENU #ifdef FEAT_MENU
static void static void
@ -2993,8 +2994,9 @@ _OnDestroy(HWND hwnd)
_OnPaint( _OnPaint(
HWND hwnd) HWND hwnd)
{ {
if (!IsMinimized(hwnd)) if (IsMinimized(hwnd))
{ return;
PAINTSTRUCT ps; PAINTSTRUCT ps;
out_flush(); // make sure all output has been processed out_flush(); // make sure all output has been processed
@ -3020,7 +3022,6 @@ _OnPaint(
EndPaint(hwnd, &ps); EndPaint(hwnd, &ps);
} }
}
static void static void
_OnSize( _OnSize(
@ -3904,8 +3905,9 @@ _OnDropFiles(
DragFinish(hDrop); DragFinish(hDrop);
if (fnames != NULL) if (fnames == NULL)
{ return;
int kbd_modifiers = get_active_modifiers(); int kbd_modifiers = get_active_modifiers();
if ((kbd_modifiers & MOD_MASK_SHIFT) != 0) if ((kbd_modifiers & MOD_MASK_SHIFT) != 0)
@ -3919,7 +3921,6 @@ _OnDropFiles(
s_need_activate = TRUE; s_need_activate = TRUE;
} }
}
static int static int
_OnScroll( _OnScroll(
@ -4461,12 +4462,12 @@ show_sizing_tip(int cols, int rows)
static void static void
destroy_sizing_tip(void) destroy_sizing_tip(void)
{ {
if (hwndTip != NULL) if (hwndTip == NULL)
{ return;
DestroyWindow(hwndTip); DestroyWindow(hwndTip);
hwndTip = NULL; hwndTip = NULL;
} }
}
static int static int
_DuringSizing( _DuringSizing(
@ -5844,8 +5845,9 @@ im_set_active(int active)
} }
# endif # endif
if (pImmGetContext) // if NULL imm32.dll wasn't loaded (yet) if (!pImmGetContext) // if NULL imm32.dll wasn't loaded (yet)
{ return;
if (p_imdisable) if (p_imdisable)
{ {
if (hImcOld == (HIMC)0) if (hImcOld == (HIMC)0)
@ -5863,8 +5865,9 @@ im_set_active(int active)
} }
hImc = pImmGetContext(s_hwnd); hImc = pImmGetContext(s_hwnd);
if (hImc) if (!hImc)
{ return;
/* /*
* for Korean ime * for Korean ime
*/ */
@ -5901,8 +5904,6 @@ im_set_active(int active)
pImmSetOpenStatus(hImc, active); pImmSetOpenStatus(hImc, active);
pImmReleaseContext(s_hwnd, hImc); pImmReleaseContext(s_hwnd, hImc);
} }
}
}
/* /*
* Get IM status. When IM is on, return not 0. Else return 0. * Get IM status. When IM is on, return not 0. Else return 0.
@ -6459,8 +6460,9 @@ gui_make_popup(char_u *path_name, int mouse_pos)
{ {
vimmenu_T *menu = gui_find_menu(path_name); vimmenu_T *menu = gui_find_menu(path_name);
if (menu != NULL) if (menu == NULL)
{ return;
POINT p; POINT p;
// Find the position of the current cursor // Find the position of the current cursor
@ -6481,7 +6483,6 @@ gui_make_popup(char_u *path_name, int mouse_pos)
msg_scroll = FALSE; msg_scroll = FALSE;
gui_mch_show_popupmenu_at(menu, (int)p.x, (int)p.y); gui_mch_show_popupmenu_at(menu, (int)p.x, (int)p.y);
} }
}
# if defined(FEAT_TEAROFF) || defined(PROTO) # if defined(FEAT_TEAROFF) || defined(PROTO)
/* /*
@ -8274,7 +8275,9 @@ gui_mch_drawsign(int row, int col, int typenr)
static void static void
close_signicon_image(signicon_t *sign) close_signicon_image(signicon_t *sign)
{ {
if (sign) if (sign == NULL)
return;
switch (sign->uType) switch (sign->uType)
{ {
case IMAGE_BITMAP: case IMAGE_BITMAP:
@ -8347,12 +8350,12 @@ gui_mch_register_sign(char_u *signfile)
void void
gui_mch_destroy_sign(void *sign) gui_mch_destroy_sign(void *sign)
{ {
if (sign) if (sign == NULL)
{ return;
close_signicon_image((signicon_t *)sign); close_signicon_image((signicon_t *)sign);
vim_free(sign); vim_free(sign);
} }
}
#endif #endif
#if defined(FEAT_BEVAL_GUI) || defined(PROTO) #if defined(FEAT_BEVAL_GUI) || defined(PROTO)
@ -8561,8 +8564,9 @@ Handle_WM_Notify(HWND hwnd UNUSED, LPNMHDR pnmh)
if (pnmh->idFrom != ID_BEVAL_TOOLTIP) // it is not our tooltip if (pnmh->idFrom != ID_BEVAL_TOOLTIP) // it is not our tooltip
return; return;
if (cur_beval != NULL) if (cur_beval == NULL)
{ return;
switch (pnmh->code) switch (pnmh->code)
{ {
case TTN_SHOW: case TTN_SHOW:
@ -8591,7 +8595,6 @@ Handle_WM_Notify(HWND hwnd UNUSED, LPNMHDR pnmh)
break; break;
} }
} }
}
static void static void
track_user_activity(UINT uMsg) track_user_activity(UINT uMsg)

View File

@ -2194,12 +2194,12 @@ gui_mch_get_rgb_color(int r, int g, int b)
void void
gui_mch_set_fg_color(guicolor_T color) gui_mch_set_fg_color(guicolor_T color)
{ {
if (color != prev_fg_color) if (color == prev_fg_color)
{ return;
XSetForeground(gui.dpy, gui.text_gc, (Pixel)color); XSetForeground(gui.dpy, gui.text_gc, (Pixel)color);
prev_fg_color = color; prev_fg_color = color;
} }
}
/* /*
* Set the current text background color. * Set the current text background color.
@ -2207,12 +2207,12 @@ gui_mch_set_fg_color(guicolor_T color)
void void
gui_mch_set_bg_color(guicolor_T color) gui_mch_set_bg_color(guicolor_T color)
{ {
if (color != prev_bg_color) if (color == prev_bg_color)
{ return;
XSetBackground(gui.dpy, gui.text_gc, (Pixel)color); XSetBackground(gui.dpy, gui.text_gc, (Pixel)color);
prev_bg_color = color; prev_bg_color = color;
} }
}
/* /*
* Set the current text special color. * Set the current text special color.
@ -2814,8 +2814,9 @@ clip_mch_set_selection(
void void
gui_mch_menu_grey(vimmenu_T *menu, int grey) gui_mch_menu_grey(vimmenu_T *menu, int grey)
{ {
if (menu->id != (Widget)0) if (menu->id == (Widget)0)
{ return;
gui_mch_menu_hidden(menu, False); gui_mch_menu_hidden(menu, False);
if (grey if (grey
#ifdef FEAT_GUI_MOTIF #ifdef FEAT_GUI_MOTIF
@ -2826,7 +2827,6 @@ gui_mch_menu_grey(vimmenu_T *menu, int grey)
else else
XtSetSensitive(menu->id, True); XtSetSensitive(menu->id, True);
} }
}
/* /*
* Make menu item hidden or not hidden * Make menu item hidden or not hidden
@ -2834,14 +2834,14 @@ gui_mch_menu_grey(vimmenu_T *menu, int grey)
void void
gui_mch_menu_hidden(vimmenu_T *menu, int hidden) gui_mch_menu_hidden(vimmenu_T *menu, int hidden)
{ {
if (menu->id != (Widget)0) if (menu->id == (Widget)0)
{ return;
if (hidden) if (hidden)
XtUnmanageChild(menu->id); XtUnmanageChild(menu->id);
else else
XtManageChild(menu->id); XtManageChild(menu->id);
} }
}
/* /*
* This is called after setting all the menus to grey/hidden or not. * This is called after setting all the menus to grey/hidden or not.
@ -3130,8 +3130,9 @@ gui_mch_drawsign(int row, int col, int typenr)
{ {
XImage *sign; XImage *sign;
if (gui.in_use && (sign = (XImage *)sign_get_image(typenr)) != NULL) if (!gui.in_use || (sign = (XImage *)sign_get_image(typenr)) == NULL)
{ return;
XClearArea(gui.dpy, gui.wid, TEXT_X(col), TEXT_Y(row) - sign->height, XClearArea(gui.dpy, gui.wid, TEXT_X(col), TEXT_Y(row) - sign->height,
SIGN_WIDTH, gui.char_height, FALSE); SIGN_WIDTH, gui.char_height, FALSE);
XPutImage(gui.dpy, gui.wid, gui.text_gc, sign, 0, 0, XPutImage(gui.dpy, gui.wid, gui.text_gc, sign, 0, 0,
@ -3139,7 +3140,6 @@ gui_mch_drawsign(int row, int col, int typenr)
TEXT_Y(row) - sign->height, TEXT_Y(row) - sign->height,
sign->width, sign->height); sign->width, sign->height);
} }
}
void * void *
gui_mch_register_sign(char_u *signfile) gui_mch_register_sign(char_u *signfile)
@ -3202,8 +3202,9 @@ static int last_shape = 0;
gui_mch_mousehide( gui_mch_mousehide(
int hide) // TRUE = use blank ptr, FALSE = use parent ptr int hide) // TRUE = use blank ptr, FALSE = use parent ptr
{ {
if (gui.pointer_hidden != hide) if (gui.pointer_hidden == hide)
{ return;
gui.pointer_hidden = hide; gui.pointer_hidden = hide;
if (hide) if (hide)
XDefineCursor(gui.dpy, gui.wid, gui.blank_pointer); XDefineCursor(gui.dpy, gui.wid, gui.blank_pointer);
@ -3214,7 +3215,6 @@ gui_mch_mousehide(
XUndefineCursor(gui.dpy, gui.wid); XUndefineCursor(gui.dpy, gui.wid);
#endif #endif
} }
}
#if defined(FEAT_MOUSESHAPE) || defined(PROTO) #if defined(FEAT_MOUSESHAPE) || defined(PROTO)
@ -3280,9 +3280,10 @@ mch_set_mouse_shape(int shape)
void void
gui_mch_menu_set_tip(vimmenu_T *menu) gui_mch_menu_set_tip(vimmenu_T *menu)
{ {
if (menu->id != NULL && menu->parent != NULL if (menu->id == NULL || menu->parent == NULL
&& menu_is_toolbar(menu->parent->name)) || !menu_is_toolbar(menu->parent->name))
{ return;
// Always destroy and create the balloon, in case the string was // Always destroy and create the balloon, in case the string was
// changed. // changed.
if (menu->tip != NULL) if (menu->tip != NULL)
@ -3297,5 +3298,4 @@ gui_mch_menu_set_tip(vimmenu_T *menu)
NULL, NULL,
NULL); NULL);
} }
}
#endif #endif

View File

@ -199,20 +199,21 @@ im_set_active(int active)
void void
xim_set_focus(int focus) xim_set_focus(int focus)
{ {
if (xic != NULL) if (xic == NULL)
{ return;
if (focus) if (focus)
gtk_im_context_focus_in(xic); gtk_im_context_focus_in(xic);
else else
gtk_im_context_focus_out(xic); gtk_im_context_focus_out(xic);
} }
}
void void
im_set_position(int row, int col) im_set_position(int row, int col)
{ {
if (xic != NULL) if (xic == NULL)
{ return;
GdkRectangle area; GdkRectangle area;
area.x = FILL_X(col); area.x = FILL_X(col);
@ -225,7 +226,6 @@ im_set_position(int row, int col)
if (p_imst == IM_OVER_THE_SPOT) if (p_imst == IM_OVER_THE_SPOT)
im_preedit_window_set_position(); im_preedit_window_set_position();
} }
}
# if 0 || defined(PROTO) // apparently only used in gui_x11.c # if 0 || defined(PROTO) // apparently only used in gui_x11.c
void void

View File

@ -695,6 +695,8 @@ static char *(features[]) =
static int included_patches[] = static int included_patches[] =
{ /* Add new patch number below this line */ { /* Add new patch number below this line */
/**/
1158,
/**/ /**/
1157, 1157,
/**/ /**/