1
0
forked from aniani/vim

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

@@ -199,32 +199,32 @@ im_set_active(int active)
void
xim_set_focus(int focus)
{
if (xic != NULL)
{
if (focus)
gtk_im_context_focus_in(xic);
else
gtk_im_context_focus_out(xic);
}
if (xic == NULL)
return;
if (focus)
gtk_im_context_focus_in(xic);
else
gtk_im_context_focus_out(xic);
}
void
im_set_position(int row, int col)
{
if (xic != NULL)
{
GdkRectangle area;
if (xic == NULL)
return;
area.x = FILL_X(col);
area.y = FILL_Y(row);
area.width = gui.char_width * (mb_lefthalve(row, col) ? 2 : 1);
area.height = gui.char_height;
GdkRectangle area;
gtk_im_context_set_cursor_location(xic, &area);
area.x = FILL_X(col);
area.y = FILL_Y(row);
area.width = gui.char_width * (mb_lefthalve(row, col) ? 2 : 1);
area.height = gui.char_height;
if (p_imst == IM_OVER_THE_SPOT)
im_preedit_window_set_position();
}
gtk_im_context_set_cursor_location(xic, &area);
if (p_imst == IM_OVER_THE_SPOT)
im_preedit_window_set_position();
}
# if 0 || defined(PROTO) // apparently only used in gui_x11.c