aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/edit.c
Commit message (Collapse)AuthorAge
...
* | Merge #9815 'vim-patch:8.1.1068: complete_info()'Justin M. Keyes2019-03-30
|\ \ | |/ |/|
| * vim-patch:8.1.1068: cannot get all the information about current completionShougo Matsushita2019-03-30
|/ | | | | | Problem: Cannot get all the information about current completion. Solution: Add complete_info(). (Shougo, Hirohito Higashi, closes vim/vim#4106) https://github.com/vim/vim/commit/fd133323d4e1cc9c0e61c0ce357df4d36ea148e3
* signs: support multiple columns #9295Dan Aloni2019-03-25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | closes #990 closes #9295 - Support for multiple auto-adjusted sign columns. With this change, having more than one sign on a line, and with the 'auto' setting on 'signcolumn', extra columns will shown automatically to accomodate all the existing signs. For example, suppose we have this view: 5147 } 5148 5149 return sign->typenr; 5150 } 5151 } 5152 return 0; 5153 } 5154 We have GitGutter installed, so it tells us about modified lines that are not commmited. So let's change line 5152: 5147 } 5148 5149 return sign->typenr; 5150 } 5151 } ~ 5152 return 0; 5153 } 5154 Now we add a mark over line 5152 using 'ma' in normal mode: 5147 } 5148 5149 return sign->typenr; 5150 } 5151 } a ~ 5152 return 0; 5153 } 5154 Previously, Vim/Nvim would have picked only one of the signs, because there was no support for having multiple signs in a line. - Remove signs from deleted lines. Suppose we have highlights on a group of lines and we delete them: + 6 use std::ops::Deref; --+ 7 use std::borrow::Cow; --+ 8 use std::io::{Cursor}; 9 use proc_macro2::TokenStream; 10 use syn::export::ToTokens; --+ 11 use std::io::Write; >> 12 use std::ops::Deref; Without this change, these signs will momentarily accumulate in the sign column until the plugins wake up to refresh them. + --+ --+ --+ >> 6 Discussion: It may be better to extend the API a bit and allow this to happen for only certain types of signs. For example, VIM marks and vim-gitgutter removal signs may want to be presreved, unlike line additions and linter highlights. - 'signcolumn': support 'auto:NUM' and 'yes:NUM' settings - sort signs according to id, from lowest to highest. If you have git-gutter, vim-signature, and ALE, it would appear in this order: git-gutter - vim-signature - ALE. - recalculate size before screen update - If no space for all signs, prefer the higher ids (while keeping the rendering order from low to high). - Prevent duplicate signs. Duplicate signs were invisible to the user, before using our extended non-standard signcolumn settings. - multi signcols: fix bug related to wrapped lines. In wrapped lines, the wrapped parts of a line did not include the extra columns if they existed. The result was a misdrawing of the wrapped parts. Fix the issue by: 1. initializing the signcol counter to 0 when we are on a wrap boundary 2. allowing for the draw of spaces in that case.
* Allow using internal popupmenu or ext_popupmenu for wildmenuBjörn Linse2019-03-16
| | | | | Deprecate ext_wildmenu. ext_popupmenu already contains more state (anchor position), and will allow further expansion (info about items).
* Merge pull request #9616 from chemzqm/completechangeBjörn Linse2019-03-16
|\ | | | | add MenuPopupChanged autocmd
| * autocmd: add MenuPopupChanged autocmdchemzqm2019-03-15
| | | | | | | | | | | | Update src/nvim/auevents.lua Co-Authored-By: chemzqm <chemzqm@gmail.com>
* | vim-patch:8.1.0728: avoid breaking after single space #9733Jan Edmund Lazo2019-03-15
| | | | | | | | | | Problem: Cannot avoid breaking after a single space. Solution: Add the 'p' flag to 'formatoptions'. (Tom Ryder) https://github.com/vim/vim/commit/c3c3158756ae074052b0db2a3e3a7ba192df5330
* | vim-patch:8.0.0643: when a pattern search is slow Vim becomes unusableBilly Su2019-03-07
|/ | | | | | | | | Problem: When 'hlsearch' is set and matching with the last search pattern is very slow, Vim becomes unusable. Cannot quit search by pressing CTRL-C. Solution: When the search times out set a flag and don't try again. Check for timeout and CTRL-C in NFA loop that adds states. https://github.com/vim/vim/commit/fbd0b0af6800f6ff89857863d6a07ea03f09ff6c
* edit.c: Disable indent during completionlePerdu2019-03-03
| | | | closes #8345
* cleanup: remove legacy `enc_dbcs` global #9660Justin M. Keyes2019-03-02
|
* vim-patch:8.1.0932: remove Farsi support (#9622)Justin M. Keyes2019-02-17
| | | | | Problem: Farsi support is outdated and unused. Solution: Delete the Farsi support. https://github.com/vim/vim/commit/14184a3133b9a6ee5f711d493c04e41ba4fa7c2f
* rename ui_is_external to ui_has (#9576)Justin M. Keyes2019-02-03
|
* vim-patch:8.1.0792: bad display if opening cmdline window from Insert completionBjörn Linse2019-02-02
|
* Reduce pum redraws from edit.c by delaying undisplay of pumBjörn Linse2019-02-02
| | | | | This makes it possible for the compositor to compare the old pum with the new position, and only clear what is necessary.
* window/ui: reorganize size variables, fix terminal window size with multigrid.Björn Linse2019-01-27
| | | | | | | wp->w_height_inner now contains the "inner" size, regardless if the window has been drawn yet or not. It should be used instead of wp->w_grid.Rows, for stuff that is not directly related to accessing the allocated grid memory, such like cursor movement and terminal size
* ui: multigrid mouse supportBjörn Linse2019-01-20
|
* display: unify cursorline and concealcursor redraw logicBjörn Linse2019-01-13
| | | | | | | | | | | | | | | | There is various places where 'conceallevel' and 'concealcursor' necessitates additional redraws. This tries to separate the different cases and handle each accordingly: - Share code with 'cursorline' for the common case: vertical move of cursor within the same window (concealcursor not active) - Improve the logic for managing 'concealcursor' and switching modes: test for the case where the new mode behaves differently from the last one. - Clarify the special case for horizontal movement within a line when 'concealcursor' is active, now there is an if-statement only for this and not hidden in larger check mostly for the first point. - Keep the special case for moving between windows as is.
* normal/edit: add missing "need_cursor_line_redraw = false"Björn Linse2019-01-12
| | | | vim-patch:8.1.0726: redrawing specifically for conceal feature
* screen: make update_screen() the only entry point for redrawingBjörn Linse2019-01-11
| | | | | | | | | | | | | | | update_single_line() was only used for 'concealcursor'. But 'cursorline' has very similiar characteristics (redraw both lines on move cursor between lines) and works without its own special entry point to the redraw subsystem. Later on 'concealcursor' and 'cursorline' could share more logic, but for now make the former use standard redrawWinline(). Make sure it is called before update_screen(), so that it is immediately visible. Get rid of update_prepare() and update_finish(), and all issues from them and their callsites not being in sync with changes to update_screen()
* Merge pull request #9479 from bfredl/redrawsignBjörn Linse2019-01-09
|\ | | | | screen: remove ad-hoc code path for redrawing signs.
| * remove dead argument of redrawWinlineBjörn Linse2019-01-09
| |
* | api: select items in popupmenuBjörn Linse2019-01-09
|/
* lintJan Edmund Lazo2019-01-07
|
* vim-patch:8.1.0696: when test_edit fails 'insertmode' may not be resetJan Edmund Lazo2019-01-06
| | | | | | | | | Problem: When test_edit fails 'insertmode' may not be reset and the next test may get stuck. (James McCoy) Solution: Always reset 'insertmode' after executing a test. Avoid that an InsertCharPre autocommand or a 'complete' function can change the state. (closes vim/vim#3768) https://github.com/vim/vim/commit/8ad16da7290190f55f88073d5586dfe133fddf45
* multigrid: rename grid->ScreenLines and other grid arraysBjörn Linse2018-12-31
|
* multigrid: various cleanup (types, unused parameters)Björn Linse2018-12-31
| | | | Handle the rare case of full highlight table properly
* multigrid: Fix lint errorsUtkarsh Maheshwari2018-12-31
|
* multigrid: avoid allocation when not ext_multigrid.Björn Linse2018-12-31
| | | | Move grid specific functions from mbyte.c to screen.c
* multigrid: Add ScreenGrid as a param to multibyte functionsUtkarsh Maheshwari2018-12-31
|
* multigrid: Get rid of global ScreenLines and set_screengridUtkarsh Maheshwari2018-12-31
|
* multigrid: Change screen_* functions to grid_* functionsUtkarsh Maheshwari2018-12-31
|
* insert: make <cmd> mapping work in completion (CTRL-X) modeBjörn Linse2018-12-01
|
* vim-patch:8.0.1731: characters deleted on completionJan Edmund Lazo2018-11-20
| | | | | | | Problem: Characters deleted on completion. (Adrià Farrés) Solution: Also check the last item for the ORIGINAL_TEXT flag. (Christian Brabandt, closes vim/vim#1645) https://github.com/vim/vim/commit/e87edf3b85f607632e5431640071fdbc36b685b2
* vim-patch:8.1.0504: when CTRL-C is mapped it triggers InsertLeave (#9192)Jan Edmund Lazo2018-11-03
| | | | | Problem: When CTRL-C is mapped it triggers InsertLeave. Solution: Make CTRL-C behave the same way when typed or used in a mapping. https://github.com/vim/vim/commit/4dbc2627641a6b950c30c31cbf7b7e6c36da1927
* vim-patch:8.0.1766: expanding abbreviation doesn't workJan Edmund Lazo2018-11-01
| | | | | | | Problem: Expanding abbreviation doesn't work. (Tooth Pik) Solution: Return OK instead of FALSE and FAIL instead of TRUE. (Christian Brabandt) https://github.com/vim/vim/commit/c3c3e698966fac86dee94799b70947defb85440d
* vim-patch:8.0.1758: open_line() returns TRUE/FALSE for success/failureJan Edmund Lazo2018-11-01
| | | | | | Problem: open_line() returns TRUE/FALSE for success/failure. Solution: Return OK or FAIL. https://github.com/vim/vim/commit/24a2d7264fc2394f69a9a890b34d1f09cf63b14e
* replace fallthrough comment with macroJan Edmund Lazo2018-09-21
| | | | Follow-up of vim-patch:8.0.1215
* vim-patch:8.0.1215: newer gcc warns for implicit fallthroughJan Edmund Lazo2018-09-20
| | | | | | Problem: Newer gcc warns for implicit fallthrough. Solution: Consistently use a FALLTHROUGH comment. (Christian Brabandt) https://github.com/vim/vim/commit/2f40d129bf45cd35976e4120336ae6d504f5a5dd
* vim-patch:8.1.0372: screen updating slow when 'cursorline' is set (#8986)Justin M. Keyes2018-09-12
| | | | | Problem: Screen updating slow when 'cursorline' is set. Solution: Only redraw the old and new cursor line, not all lines. https://github.com/vim/vim/commit/90a997987dbbe43af3c15118a35f658f0f037d1d
* vim-patch:8.0.1809: various typosJan Edmund Lazo2018-09-11
| | | | | | Problem: Various typos. Solution: Correct the mistakes, change "cursur" to "cursor". (closes vim/vim#2887) https://github.com/vim/vim/commit/b9464821901623f983528acaed9e4dc2cea7387b
* vim-patch:8.0.1154: 'indentkeys' does not work properly (#8980)Jan Edmund Lazo2018-09-11
| | | | | Problem: 'indentkeys' does not work properly. (Gary Johnson) Solution: Get the cursor line again. (Christian Brabandt, closes vim/vim#2151) https://github.com/vim/vim/commit/1b38344e00af65df12946fffda7f3201621c35ef
* lint: clean-up after parent commitsZviRackover2018-09-09
|
* Remove has_mbytes local to lines changed in parent commitZviRackover2018-09-09
|
* Refactor: Remove occurences of mb_char2bytesZviRackover2018-09-09
|
* Merge #8863 'refactor: Remove mb_head_off() 'Justin M. Keyes2018-08-28
|\
| * lint: cleanup after parent commitsZviRackover2018-08-16
| |
| * Remove has_mbyte from lines near changes in parent commitZviRackover2018-08-16
| |
| * Remove occurences of mb_head_offZviRackover2018-08-15
| |
* | lintJan Edmund Lazo2018-08-23
| |
* | vim-patch:8.0.1041: bogus characters when indenting during visual-block appendJan Edmund Lazo2018-08-23
|/ | | | | | | Problem: Bogus characters appear when indenting kicks in while doing a visual-block append. Solution: Recompute when indenting is done. (Christian Brabandt) https://github.com/vim/vim/commit/e2e69e48134cbfdedea7802810932f8592705024