diff options
author | Justin M. Keyes <justinkz@gmail.com> | 2014-09-08 20:50:44 -0400 |
---|---|---|
committer | Justin M. Keyes <justinkz@gmail.com> | 2014-09-08 20:50:44 -0400 |
commit | 9fa467a9b227243c9c534ae0df1bdaf8235551a0 (patch) | |
tree | 85449173705a443081b1189a9d1087df74030703 /src/nvim/ops.c | |
parent | 3f5482d3251b3bbdc7c4df8a8e64eb3af7e5922c (diff) | |
parent | ac0b9714edbb7697b8324f922024401baea8953b (diff) | |
download | rneovim-9fa467a9b227243c9c534ae0df1bdaf8235551a0.tar.gz rneovim-9fa467a9b227243c9c534ae0df1bdaf8235551a0.tar.bz2 rneovim-9fa467a9b227243c9c534ae0df1bdaf8235551a0.zip |
Merge pull request #1096 from war1025/dev/local_for_all_windows
Convert FOR_ALL_WINDOWS to use a locally declared pointer
Diffstat (limited to 'src/nvim/ops.c')
-rw-r--r-- | src/nvim/ops.c | 10 |
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; + } } } } |