Mercurial > vim
comparison src/ops.c @ 23241:87acfcf65a2e v8.2.2166
patch 8.2.2166: auto format doesn't work when deleting text
Commit: https://github.com/vim/vim/commit/d0a1dee3f197d41434df4cf0271066b6aeb690fc
Author: Bram Moolenaar <Bram@vim.org>
Date: Sun Dec 20 13:07:48 2020 +0100
patch 8.2.2166: auto format doesn't work when deleting text
Problem: Auto format doesn't work when deleting text.
Solution: Make "x" trigger auto format. (closes https://github.com/vim/vim/issues/7504)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sun, 20 Dec 2020 13:15:04 +0100 |
parents | 473a1413d09b |
children | 5b4db8035d1d |
comparison
equal
deleted
inserted
replaced
23240:8bb577c256d7 | 23241:87acfcf65a2e |
---|---|
936 (void)del_bytes((long)n, !virtual_op, | 936 (void)del_bytes((long)n, !virtual_op, |
937 oap->op_type == OP_DELETE && !oap->is_VIsual); | 937 oap->op_type == OP_DELETE && !oap->is_VIsual); |
938 curwin->w_cursor = curpos; // restore curwin->w_cursor | 938 curwin->w_cursor = curpos; // restore curwin->w_cursor |
939 (void)do_join(2, FALSE, FALSE, FALSE, FALSE); | 939 (void)do_join(2, FALSE, FALSE, FALSE, FALSE); |
940 } | 940 } |
941 auto_format(FALSE, TRUE); | |
941 } | 942 } |
942 | 943 |
943 msgmore(curbuf->b_ml.ml_line_count - old_lcount); | 944 msgmore(curbuf->b_ml.ml_line_count - old_lcount); |
944 | 945 |
945 setmarks: | 946 setmarks: |