Mercurial > vim
comparison src/ops.c @ 6971:e859731ea1cd v7.4.803
patch 7.4.803
Problem: C indent does not support C11 raw strings. (Mark Lodato)
Solution: Do not change indent inside the raw string.
author | Bram Moolenaar <bram@vim.org> |
---|---|
date | Tue, 28 Jul 2015 21:17:36 +0200 |
parents | d19e79d29bf9 |
children | b10995a2f7c3 |
comparison
equal
deleted
inserted
replaced
6970:589a962ecc16 | 6971:e859731ea1cd |
---|---|
684 oparg_T *oap; | 684 oparg_T *oap; |
685 int (*how) __ARGS((void)); | 685 int (*how) __ARGS((void)); |
686 { | 686 { |
687 long i; | 687 long i; |
688 char_u *l; | 688 char_u *l; |
689 int count; | 689 int amount; |
690 linenr_T first_changed = 0; | 690 linenr_T first_changed = 0; |
691 linenr_T last_changed = 0; | 691 linenr_T last_changed = 0; |
692 linenr_T start_lnum = curwin->w_cursor.lnum; | 692 linenr_T start_lnum = curwin->w_cursor.lnum; |
693 | 693 |
694 /* Don't even try when 'modifiable' is off. */ | 694 /* Don't even try when 'modifiable' is off. */ |
717 || how != get_lisp_indent) | 717 || how != get_lisp_indent) |
718 #endif | 718 #endif |
719 { | 719 { |
720 l = skipwhite(ml_get_curline()); | 720 l = skipwhite(ml_get_curline()); |
721 if (*l == NUL) /* empty or blank line */ | 721 if (*l == NUL) /* empty or blank line */ |
722 count = 0; | 722 amount = 0; |
723 else | 723 else |
724 count = how(); /* get the indent for this line */ | 724 amount = how(); /* get the indent for this line */ |
725 | 725 |
726 if (set_indent(count, SIN_UNDO)) | 726 if (amount >= 0 && set_indent(amount, SIN_UNDO)) |
727 { | 727 { |
728 /* did change the indent, call changed_lines() later */ | 728 /* did change the indent, call changed_lines() later */ |
729 if (first_changed == 0) | 729 if (first_changed == 0) |
730 first_changed = curwin->w_cursor.lnum; | 730 first_changed = curwin->w_cursor.lnum; |
731 last_changed = curwin->w_cursor.lnum; | 731 last_changed = curwin->w_cursor.lnum; |