Mercurial > vim
comparison src/register.c @ 28942:6cdf55afaae9 v8.2.4993
patch 8.2.4993: smart/C/lisp indenting is optional
Commit: https://github.com/vim/vim/commit/8e145b82464a21ee4fdf7948f04e2a1d505f8bfa
Author: Bram Moolenaar <Bram@vim.org>
Date: Sat May 21 20:17:31 2022 +0100
patch 8.2.4993: smart/C/lisp indenting is optional
Problem: smart/C/lisp indenting is optional, which makes the code more
complex, while it only reduces the executable size a bit.
Solution: Graduate FEAT_CINDENT, FEAT_SMARTINDENT and FEAT_LISP.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sat, 21 May 2022 21:30:04 +0200 |
parents | 21e96d9b66c0 |
children | e6f486df5cc9 |
comparison
equal
deleted
inserted
replaced
28941:f17de8647585 | 28942:6cdf55afaae9 |
---|---|
2152 old_pos = curwin->w_cursor; | 2152 old_pos = curwin->w_cursor; |
2153 curwin->w_cursor.lnum = lnum; | 2153 curwin->w_cursor.lnum = lnum; |
2154 ptr = ml_get(lnum); | 2154 ptr = ml_get(lnum); |
2155 if (cnt == count && i == y_size - 1) | 2155 if (cnt == count && i == y_size - 1) |
2156 lendiff = (int)STRLEN(ptr); | 2156 lendiff = (int)STRLEN(ptr); |
2157 #if defined(FEAT_SMARTINDENT) || defined(FEAT_CINDENT) | |
2158 if (*ptr == '#' && preprocs_left()) | 2157 if (*ptr == '#' && preprocs_left()) |
2159 indent = 0; // Leave # lines at start | 2158 indent = 0; // Leave # lines at start |
2160 else | 2159 else |
2161 #endif | |
2162 if (*ptr == NUL) | 2160 if (*ptr == NUL) |
2163 indent = 0; // Ignore empty lines | 2161 indent = 0; // Ignore empty lines |
2164 else if (first_indent) | 2162 else if (first_indent) |
2165 { | 2163 { |
2166 indent_diff = orig_indent - get_indent(); | 2164 indent_diff = orig_indent - get_indent(); |