aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/api/window.c
Commit message (Collapse)AuthorAge
* perf(screen): reduce cursorline redrawing when jumping aroundzeertzjq2022-03-24
| | | | | | | | | | | | | | | | | | | | vim-patch:8.2.4614: redrawing too much when 'cursorline' is set Problem: Redrawing too much when 'cursorline' is set and jumping around. Solution: Rely on win_update() to redraw the current and previous cursor line, do not mark lines as modified. (closes vim/vim#9996) https://github.com/vim/vim/commit/c20e46a4e3efcd408ef132872238144ea34f7ae5 This doesn't match the patch exactly, because I missed some lines when porting patch 8.1.2029, and these lines were removed in this patch. This also makes win_update() always update for 'concealcursor' like how it always updates for 'cursorline', as 'cursorline' and 'concealcursor' redrawing logic has been unified in Nvim. As redrawing for 'cursorline' now always only requires VALID redraw type, it is no longer necessary to call redraw_for_cursorline() in nvim_win_set_cursor().
* chore: fix typos (#17670)dundargoc2022-03-17
| | | Co-authored-by: zeertzjq <zeertzjq@outlook.com>
* fix(api): nvim_win_set_cursor() redraw for cursorline and statuslinezeertzjq2022-02-15
|
* fix: close floating windows when calling win_close()Rom Grk2022-02-10
|
* fix(api/nvim_win_call): share common win_execute logicSean Dewar2022-02-03
| | | | | | | | | | We have to be sure that the bugs fixed in the previous patches also apply to nvim_win_call. Checking v8.1.2124 and v8.2.4026 is especially important as these patches were only applied to win_execute, but nvim_win_call is also affected by the same bugs. A lot of win_execute's logic can be shared with nvim_win_call, so factor it out into a common macro to reduce the possibility of this happening again.
* vim-patch:8.2.4018: ml_get error when win_execute redraws with Visual selectionSean Dewar2022-02-03
| | | | | | | | | | | Problem: ml_get error when win_execute redraws with Visual selection. Solution: Disable Visual area temporarily. (closes vim/vim#9479) https://github.com/vim/vim/commit/18f4740f043b353abe47b7a00131317052457686 {switch_to/restore}_win_for_buf is N/A (marked as such in v8.0.0860; currently only used in Vim's if_py). Add a modeline to test_execute_func.vim.
* chore: fix typos (#16506)dundargoc2021-12-28
| | | | | | | | | Co-authored-by: Gregory Anders <8965202+gpanders@users.noreply.github.com> Co-authored-by: Evgeni Chasnovski <evgeni.chasnovski@gmail.com> Co-authored-by: zeertzjq <zeertzjq@outlook.com> Co-authored-by: Christoph Hasse <hassec@users.noreply.github.com> Co-authored-by: Alef Pereira <ealefpereira@gmail.com> Co-authored-by: AusCyber <willp@outlook.com.au> Co-authored-by: kylo252 <59826753+kylo252@users.noreply.github.com>
* refactor(api): move window config related functions to own fileBjörn Linse2021-10-04
|
* refactor(api): handle option dicts properlyBjörn Linse2021-10-03
| | | | | | | Do not copy a lot of lua strings (dict keys) to just strequal() them Just compare them directly to a dedicated hash function. feat(generators): HASHY McHASHFACE
* refactor: format #15702dundargoc2021-09-18
|
* chore: use codespell to spell check #15016dundargoc2021-07-07
|
* fix(api/win_get_config): include z-indexSean Dewar2021-06-19
|
* api:get_config: don't add border="none" (inactive default)Björn Linse2021-06-10
|
* fix linter errorsCorey Williamson2021-06-10
|
* api: include border in nvim_win_get_configCorey Williamson2021-06-10
|
* api: add nvim_win_callnotomo2021-06-10
|
* api(nvim_open_win): add "noautocmd" optionSean Dewar2021-06-01
| | | | | | This option, when set, stops nvim_open_win() from potentially firing buffer-related autocmd events (BufEnter, BufLeave and BufWinEnter in the case of nvim_open_win()).
* Revert "api/window: use the "noblock" variants in nvim_win_set_buf"Jan Edmund Lazo2021-05-10
| | | | | | | | | | | | | | | This reverts commit 1def3d1542d6a65f057e743faea39a760b50db87. Plugins may depend on catching the following events when creating windows: - BufWinEnter - BufEnter - BufLeave Risky to introduce this breaking change on 0.5 release when 0.5 release should be out by now. https://github.com/asvetliakov/vscode-neovim/issues/632#issuecomment-837201224
* Merge pull request #13664 from ivechan/win_exectuteJan Edmund Lazo2021-05-07
|\ | | | | vim-patch:8.1.{1418,1425,1832,2124},8.2.{0137, 2340}
| * api/window: use the "noblock" variants in nvim_win_set_bufjing2021-05-06
| | | | | | | | | | | | | | | | | | after commit 92c6383cdca977("vim-patch:8.1.1425: win_execute() does not set window pointers properly"), nvim_win_set_buf can use switch_win_noblock and restore_win_noblock. It makes nvim_win_set_buf don't block autocmds so that it will be more "without side-effects" as said in help text. Signed-off-by: jing <lhchenjw@gmail.com>
* | fix: make nvim_win_get_number() return win number (#14470)Julian Berman2021-05-01
|/ | | Closes https://github.com/neovim/neovim/issues/14467
* api: clarify difference between win_hide and win_closeCorey Williamson2021-03-10
|
* api: add vim.api.nvim_win_hideCorey Williamson2021-03-09
|
* api: add textlock checknotomo2020-12-15
|
* api: move deprecated functions to separate filesBjörn Linse2020-12-05
| | | | | Most these are just calls to non-deprecated variants, and take up unnecessary space and search hits in the other files.
* api: add API for themesBjörn Linse2020-11-01
| | | | | | | | | | co-author: hlpr98 <hlpr98@gmail.com> (dict2hlattrs function) orange is sus?? NOVEMBER DAWN erase the lie that is redraw_later()
* docJustin M. Keyes2019-09-11
| | | | | fix #10127 fix #5972
* doc: |api-fast| [ci skip]Justin M. Keyes2019-09-09
|
* anchor float to buffer positionBjörn Linse2019-09-04
| | | | vim-patch:8.1.1645: cannot use a popup window for a balloon
* api/window: disallow closing non-current window in cmdwin stateBjörn Linse2019-08-10
|
* API: nvim_win_close: Fix closing cmdline-window #10087R. Simon2019-08-10
|
* api/window: add style="minimal" flag to nvim_open_win()Björn Linse2019-07-07
|
* doc/API: document indexing behavior #10058KillTheMule2019-05-26
| | | | close #10058
* windows: float config changesBjörn Linse2019-04-14
| | | | | | | | | | - Allow floating windows of width 1. #9846 - For a new floating window the size must be specified. Later on we might try to calculate a reasonable size by buffer contents - Remember the configured size of a window, just like its position. - Make get_config and set_config more consistent. Handle relative='' properly in set_config. get_config doesn't return keys that don't make sense for a non-floating window. - Don't use width=0 for non-changed width, just omit the key.
* api/window: validate cursor in nvim_win_set_bufBjörn Linse2019-04-08
| | | | | | validate_cursor() is called regularly, but only for the current window. When changing the buffer for a non-current window, we need to invoke it in the context of that window.
* doc [ci skip]Justin M. Keyes2019-03-26
| | | | closes #9719
* api: refactor FloatRelative usageMarco Hinz2019-03-16
|
* api: numerous small fixesMarco Hinz2019-03-16
|
* api: update docMarco Hinz2019-03-16
|
* api: add width/height to FloatConfigMarco Hinz2019-03-16
|
* api: nvim_win_config() -> nvim_win_set_config()Marco Hinz2019-03-16
|
* api: refactor FloatAnchor usageMarco Hinz2019-03-16
|
* api: add nvim_win_get_config()Marco Hinz2019-03-16
|
* api: add nvim_win_close() to close window by idBjörn Linse2019-03-03
|
* floats: implement floating windowsBjörn Linse2019-03-02
| | | | Co-Author: Dongdong Zhou <dzhou121@gmail.com>
* API: don't directly call update_screen() in API functionsBjörn Linse2019-01-08
| | | | | | | | | There is no need to call update_screen() directly in an API function, mode input processing invokes update_screen() as needed. And if the API call is done in a context where redraw is disabled, then redraw is disabled for a reason. A lot of API functions are of equal semantical strength (nvim_call_function and nvim_execute_lua can also do whatever, nvim_command is not special), this inconsistency has no purpose.
* API: Implement nvim_win_set_buf() #9100Justin M. Keyes2018-11-25
| | | | closes #9100
* Improved version of #8613David Hotham2018-06-25
| | | | This one behaves correctly eg in the presence of unicode
* API: nvim_win_set_cursor: set curswant #8613David Hotham2018-06-25
| | | Fixes #8591
* api: Make nvim_set_option() update `:verbose set ...`b-r-o-c-k2018-05-03
| | | | | | Make `:verbose set ...` show when an option was last modified by an API client or Lua script/chunk. In the case of an API client, the channel ID is displayed.