commit | 02f8694a6bd116ab3316add4a7ea6735bf2e8839 | [log] [tgz] |
---|---|---|
author | Bram Moolenaar <Bram@vim.org> | Tue Aug 17 22:14:29 2021 +0200 |
committer | Bram Moolenaar <Bram@vim.org> | Tue Aug 17 22:14:29 2021 +0200 |
tree | 78008d785172ad8fdc40e399401f823839f5f8d6 | |
parent | ccfb7c6758510e0fe5f390149ea14aee6ff4f55e [diff] [blame] |
patch 8.2.3357: crash when 'virtualedit' is set and window is narrow Problem: Crash when 'virtualedit' is set and window is narrow. () Solution: Check that width is not zero. (closes #8767)
diff --git a/src/misc2.c b/src/misc2.c index 271014f..2436f9f 100644 --- a/src/misc2.c +++ b/src/misc2.c
@@ -161,7 +161,8 @@ if (finetune && curwin->w_p_wrap && curwin->w_width != 0 - && wcol >= (colnr_T)width) + && wcol >= (colnr_T)width + && width > 0) { csize = linetabsize(line); if (csize > 0)