aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/ops.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/nvim/ops.c')
-rw-r--r--src/nvim/ops.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/nvim/ops.c b/src/nvim/ops.c
index f1cb34577b..317d773748 100644
--- a/src/nvim/ops.c
+++ b/src/nvim/ops.c
@@ -3698,17 +3698,15 @@ op_format (
}
if (oap->is_VIsual) {
- win_T *wp;
-
- FOR_ALL_WINDOWS(wp)
- {
+ FOR_ALL_WINDOWS(wp) {
if (wp->w_old_cursor_lnum != 0) {
/* When lines have been inserted or deleted, adjust the end of
* the Visual area to be redrawn. */
- if (wp->w_old_cursor_lnum > wp->w_old_visual_lnum)
+ if (wp->w_old_cursor_lnum > wp->w_old_visual_lnum) {
wp->w_old_cursor_lnum += old_line_count;
- else
+ } else {
wp->w_old_visual_lnum += old_line_count;
+ }
}
}
}