summaryrefslogtreecommitdiff
path: root/src/edit.c
Commit message (Collapse)AuthorAgeFilesLines
* patch 9.0.0734: cursor position invalid when scrolling with 'smoothscroll'v9.0.0734Bram Moolenaar2022-10-121-0/+3
| | | | | | | Problem: Cursor position invalid when scrolling with 'smoothscroll' set. (Ernie Rael) Solution: Add w_valid_skipcol and clear flags when it changes. Adjust w_skipcol after moving the cursor.
* patch 9.0.0664: bad redrawing with spell checking, using "C" and "$" in 'cpo'v9.0.0664Bram Moolenaar2022-10-051-2/+2
| | | | | Problem: Bad redrawing with spell checking, using "C" and "$" in 'cpo'. Solution: Do not redraw the next line when "$" is in 'cpo'. (closes #11285)
* patch 9.0.0657: too many #ifdefsv9.0.0657Martin Tournoij2022-10-041-4/+0
| | | | | | Problem: Too many #ifdefs. Solution: Graduate the +cmdwin feature. Now the tiny and small builds are equal, drop the small build. (Martin Tournoij, closes #11268)
* patch 9.0.0608: with spelling, deleting a full stop does not update next linev9.0.0608Bram Moolenaar2022-09-271-7/+0
| | | | | | | Problem: With spell checking, deleting a full stop at the end of a line does not update SpellCap at the start of the next line. Solution: Update the next line when characters have been deleted. Also when using undo.
* patch 9.0.0603: with 'nosplitscroll' folds are not handled correctlyv9.0.0603Luuk van Baal2022-09-271-80/+100
| | | | | | Problem: With 'nosplitscroll' folds are not handled correctly. Solution: Take care of closed folds when moving the cursor. (Luuk van Baal, closes #11234)
* patch 9.0.0590: after exiting Insert mode spelling not checked in next linev9.0.0590Bram Moolenaar2022-09-251-0/+7
| | | | | | | Problem: After exiting Insert mode spelling is not checked in the next line. Solution: When spelling is enabled redraw the next line after exiting Insert mode in case the spell highlight needs updating.
* patch 9.0.0218: reading before the start of the linev9.0.0218Bram Moolenaar2022-08-161-1/+2
| | | | | Problem: Reading before the start of the line. Solution: When displaying "$" check the column is not negative.
* patch 9.0.0206: redraw flags are not named specificallyv9.0.0206Bram Moolenaar2022-08-141-3/+3
| | | | | Problem: Redraw flags are not named specifically. Solution: Prefix "UPD_" to the flags, for UPDate_screen().
* patch 9.0.0130: cursor position wrong when inserting around virtual textv9.0.0130Bram Moolenaar2022-08-011-2/+7
| | | | | Problem: Cursor position wrong when inserting around virtual text. Solution: Update the cursor position properly.
* patch 9.0.0124: code has more indent than neededv9.0.0124zeertzjq2022-07-311-42/+43
| | | | | Problem: Code has more indent than needed. Solution: Use continue and return statements. (closes #10824)
* patch 9.0.0067: cannot show virtual textv9.0.0067Bram Moolenaar2022-07-251-19/+32
| | | | | Problem: Cannot show virtual text. Solution: Initial changes for virtual text support, using text properties.
* patch 9.0.0013: reproducing memory access errors can be difficultv9.0.0013Bram Moolenaar2022-06-301-2/+2
| | | | | | | Problem: Reproducing memory access errors can be difficult. Solution: When testing, copy each line to allocated memory, so that valgrind can detect accessing memory before and/or after it. Fix uncovered problems.
* patch 8.2.5162: reading before the start of the line with BS in Replace modev8.2.5162Bram Moolenaar2022-06-261-1/+1
| | | | | Problem: Reading before the start of the line with BS in Replace mode. Solution: Check the cursor column is more than zero.
* patch 8.2.5056: the channel log only contains some of the raw terminal outputv8.2.5056Bram Moolenaar2022-06-041-6/+4
| | | | | Problem: The channel log only contains some of the raw terminal output. Solution: Add the "o" flag to log all terminal output. Use it for "--log".
* patch 8.2.5029: "textlock" is always zerov8.2.5029zeertzjq2022-05-271-4/+3
| | | | | | Problem: "textlock" is always zero. Solution: Remove "textlock" and rename "textwinlock" to "textlock". (closes #10489)
* patch 8.2.4993: smart/C/lisp indenting is optionalv8.2.4993Bram Moolenaar2022-05-211-65/+1
| | | | | | 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.
* patch 8.2.4969: changing text in Visual mode may cause invalid memory accessv8.2.4969Bram Moolenaar2022-05-161-10/+2
| | | | | Problem: Changing text in Visual mode may cause invalid memory access. Solution: Check the Visual position after making a change.
* patch 8.2.4951: smart indenting done when not enabledv8.2.4951Bram Moolenaar2022-05-141-1/+1
| | | | | Problem: Smart indenting done when not enabled. Solution: Check option values before setting can_si. (closes #10420)
* patch 8.2.4928: various white space and cosmetic mistakesv8.2.4928Bram Moolenaar2022-05-091-7/+6
| | | | | Problem: Various white space and cosmetic mistakes. Solution: Change spaces to tabs, improve comments.
* patch 8.2.4911: the mode #defines are not clearly namedv8.2.4911Bram Moolenaar2022-05-071-42/+42
| | | | | Problem: The mode #defines are not clearly named. Solution: Prepend MODE_. Renumber them to put the mapped modes first.
* patch 8.2.4876: MS-Windows: Shift-BS results in strange char in powershellv8.2.4876Christian Brabandt2022-05-051-0/+1
| | | | | Problem: MS-Windows: Shift-BS results in strange character in powershell. Solution: Add K_S_BS. (Christian Brabandt, closes #10283, closes #10279)
* patch 8.2.4865: :startinsert right after :stopinsert may not workv8.2.4865zeertzjq2022-05-041-1/+1
| | | | | | Problem: :startinsert right after :stopinsert does not work when popup menu is still visible. Solution: Use ins_compl_active() instead of pum_visible(). (closes #10352)
* patch 8.2.4846: termcodes test failsv8.2.4846zeertzjq2022-04-291-0/+8
| | | | | Problem: Termcodes test fails. Solution: use CTRL-SHIFT-V to insert an unsimplified key. (closes #10316)
* patch 8.2.4753: error from setting an option is silently ignoredv8.2.4753Bram Moolenaar2022-04-151-2/+2
| | | | | Problem: Error from setting an option is silently ignored. Solution: Handle option value errors better. Fix uses of N_().
* patch 8.2.4739: accessing freed memory after WinScrolled autocmd eventv8.2.4739zeertzjq2022-04-121-1/+1
| | | | | | Problem: Accessing freed memory after WinScrolled autocmd event. Solution: Check the window pointer is still valid. (closes #10156) Remove the argument from may_trigger_winscrolled().
* patch 8.2.4723: the ModeChanged autocmd event is inefficientv8.2.4723LemonBoy2022-04-091-3/+3
| | | | | | Problem: The ModeChanged autocmd event is inefficient. Solution: Avoid allocating memory. (closes #10134) Rename trigger_modechanged() to may_trigger_modechanged().
* patch 8.2.4713: plugins cannot track text scrollingv8.2.4713LemonBoy2022-04-081-0/+3
| | | | | Problem: Plugins cannot track text scrolling. Solution: Add the WinScrolled event. (closes #10102)
* patch 8.2.4710: smart indenting does not work after completionv8.2.4710Christian Brabandt2022-04-071-0/+3
| | | | | Problem: Smart indenting does not work after completion. Solution: Set "can_si". (Christian Brabandt, closes #10113, closes #558)
* patch 8.2.4707: redrawing could be a bit more efficientv8.2.4707zeertzjq2022-04-071-22/+17
| | | | | Problem: Redrawing could be a bit more efficient. Solution: Optimize redrawing. (closes #10105)
* patch 8.2.4660: cursorcolumn is sometimes not correctv8.2.4660Bram Moolenaar2022-04-011-5/+8
| | | | | | Problem: Cursorcolumn is sometimes not correct. Solution: Recompute the cursor column when entering Insert mode and the cursor is on a character wider than a screen cell.
* patch 8.2.4638: superfluous check if a redraw is needed for 'cursorline'v8.2.4639v8.2.4638zeertzjq2022-03-271-4/+0
| | | | | Problem: Superfluous check if a redraw is needed for 'cursorline'. Solution: Remove check_redraw_cursorline(). (closes #10030, closes #10029)
* patch 8.2.4630: 'cursorline' not always updated with 'culopt' is "screenline"v8.2.4630Bram Moolenaar2022-03-261-0/+4
| | | | | | Problem: 'cursorline' not always updated with 'cursorlineopt' is "screenline". Solution: Call check_redraw_cursorline() more often. (closes #10013)
* patch 8.2.4273: the EBCDIC support is outdatedv8.2.4273Bram Moolenaar2022-01-311-18/+4
| | | | | Problem: The EBCDIC support is outdated. Solution: Remove the EBCDIC support.
* patch 8.2.4241: some type casts are redundantv8.2.4241=?UTF-8?q?Dundar=20G=C3=B6c?=2022-01-281-3/+3
| | | | | Problem: Some type casts are redundant. Solution: Remove the type casts. (closes #9643)
* patch 8.2.4218: illegal memory access with bracketed paste in Ex modev8.2.4218Bram Moolenaar2022-01-251-1/+2
| | | | | Problem: Illegal memory access with bracketed paste in Ex mode. Solution: Reserve space for the trailing NUL.
* patch 8.2.4203: entering a character with CTRL-V may include modifiersv8.2.4203zeertzjq2022-01-241-0/+9
| | | | | | Problem: Entering a character with CTRL-V may include modifiers. Solution: Reset "mod_mask" when entering a character with digits after CTRL-V. (closes #9610)
* patch 8.2.4099: Vim9: cannot use Vim9 syntax in mappingv8.2.4099Bram Moolenaar2022-01-151-2/+3
| | | | | Problem: Vim9: cannot use Vim9 syntax in mapping. Solution: Add <ScriptCmd> to use the script context for a command.
* patch 8.2.4038: various code not used when features are disabledv8.2.4038Dominique Pelle2022-01-081-0/+2
| | | | | Problem: Various code not used when features are disabled. Solution: Add #ifdefs. (Dominique Pellé, closes #9491)
* patch 8.2.4001: insert complete code uses global variablesv8.2.4001Yegappan Lakshmanan2022-01-041-2/+2
| | | | | | Problem: Insert complete code uses global variables. Solution: Make variables local to the file and use accessor functions. (Yegappan Lakshmanan, closes #9470)
* patch 8.2.3970: error messages are spread outv8.2.3970Bram Moolenaar2022-01-011-1/+1
| | | | | Problem: Error messages are spread out. Solution: Move more errors to errors.h.
* patch 8.2.3935: CTRL-U in Insert mode does not fix the indentv8.2.3935Bram Moolenaar2021-12-291-0/+15
| | | | | Problem: CTRL-U in Insert mode does not fix the indent. Solution: Fix the indent when 'cindent' is set.
* patch 8.2.3914: various spelling mistakes in commentsv8.2.3914Dominique Pelle2021-12-271-2/+2
| | | | | Problem: Various spelling mistakes in comments. Solution: Fix the mistakes. (Dominique Pellé, closes #9416)
* patch 8.2.3828: when opening a terminal from a timer first typed char is lostv8.2.3828Bram Moolenaar2021-12-161-2/+7
| | | | | | | Problem: when opening a terminal from a timer the first typed character is lost. (Virginia Senioria) Solution: When opening a terminal while waiting for a character put K_IGNORE in the input buffer.
* patch 8.2.3787: no proper formatting of a C line comment after a statementv8.2.3787Bram Moolenaar2021-12-121-1/+2
| | | | | | Problem: No proper formatting of a C line comment after a statement. Solution: Find the start of the line comment, insert the comment leader and indent the comment properly.
* patch 8.2.3764: cannot see any text when window was made zero linesv8.2.3764Bram Moolenaar2021-12-091-0/+5
| | | | | | Problem: Cannot see any text when window was made zero lines or zero columns. Solution: Ensure there is at least one line and column. (fixes #9307)
* patch 8.2.3517: TextChanged does not trigger after TextChangedIv8.2.3517Christian Brabandt2021-10-161-6/+6
| | | | | | Problem: TextChanged does not trigger after TextChangedI. Solution: Store the tick separately for TextChangedI. (Christian Brabandt, closes #8968, closes #8932)
* patch 8.2.3467: CursorHoldI event interferes with "CTRL-G U"v8.2.3467Bram Moolenaar2021-10-031-0/+3
| | | | | | Problem: CursorHoldI event interferes with "CTRL-G U". (Naohiro Ono) Solution: Restore the flag for "CTRL-G U" after triggering CursorHoldI. (closes #8937)
* patch 8.2.3444: concealed text not revealed when leaving insert modev8.2.3444Bram Moolenaar2021-09-161-0/+10
| | | | | | | Problem: concealed text not revealed when leaving insert mode. (Michael Soyka) Solution: Check if concealing changed when leaving insert mode. (closes #8880)
* patch 8.2.3430: no generic way to trigger an autocommand on mode changev8.2.3430=?UTF-8?q?Magnus=20Gro=C3=9F?=2021-09-121-0/+3
| | | | | Problem: No generic way to trigger an autocommand on mode change. Solution: Add the ModeChanged autocommand event. (Magnus Gross, closes #8856)
* patch 8.2.3320: some local functions are not staticv8.2.3320Yegappan Lakshmanan2021-08-091-1/+1
| | | | | | Problem: Some local functions are not static. Solution: Add "static". Move snprintf() related code to strings.c. (Yegappan Lakshmanan, closes #8734)