zeertzjq
cd6ec1db06
fix(win_close): remove float grid after closing buffer ( #21551 )
...
It is not safe to remove the float grid when autocommands can still be
triggered, as autocommands may use the float grid.
2022-12-27 17:29:05 +08:00
zeertzjq
ed23cd3e50
fix(float): fix crash with bufpos and non-existent window ( #21319 )
2022-12-07 11:36:34 +08:00
zeertzjq
eab71e7875
test: add more tests for float window bufpos ( #21318 )
2022-12-07 10:18:12 +08:00
bfredl
942f26279d
fix(tests): only get the color map once, even for multiple test files
...
Problem: test/functional/ui/screen.lua would be reloaded for each
*_spec.lua file, which causes an extra nvim session to be started
to get the color map each time.
solution: Mark screen.lua as a preloaded file, but defer the
loading of the color map to the first time Screen object is initialised.
2022-11-27 11:51:10 +01:00
Lewis Russell
e8cc489acc
feat(test): add Lua forms for API methods ( #20152 )
2022-11-14 10:01:35 +00:00
Raphael
1af4bd04f9
feat(ui): add support to display a title in the border of a float ( #20184 )
...
add "title" and "title_pos" keys to win config dict.
2022-11-06 11:59:43 +01:00
zeertzjq
14a84ec169
test: add a test for #20684
2022-10-17 21:39:49 +08:00
dundargoc
df646572c5
docs: fix typos ( #20394 )
...
Co-authored-by: Raphael <glephunter@gmail.com >
Co-authored-by: smjonas <jonas.strittmatter@gmx.de >
Co-authored-by: zeertzjq <zeertzjq@outlook.com >
2022-09-30 09:53:52 +02:00
zeertzjq
2083c1771a
fix(window): close floats first when closing buffer in other tab ( #20284 )
2022-09-22 20:25:34 +08:00
bfredl
00cfc1dceb
fix(redraw): avoid unnecessary redraws and glitches with floats+messages
...
fixes #20106
fixes #20229
2022-09-22 10:36:23 +02:00
zeertzjq
79872f3770
fix(options): properly free string options ( #19510 )
2022-07-27 07:26:32 +08:00
zeertzjq
5105f713bd
test(float_spec): make indent more consistent
2022-07-10 17:24:29 +08:00
zeertzjq
63f6ecd419
fix(float): fix mouse drag position if float window turned to a split
2022-07-10 17:24:29 +08:00
zeertzjq
63f63dd2b7
fix(float): fix glitch when making float window with border a split
2022-07-10 17:24:29 +08:00
zeertzjq
99e8298711
fix(float): fix float window with winbar cannot have screen height
2022-07-10 17:24:29 +08:00
zeertzjq
f7d6f472f7
fix(float): fix float window border drawing with winbar
2022-07-10 17:24:29 +08:00
Famiu Haque
46536f53e8
feat: add preview functionality to user commands
...
Adds a Lua-only `preview` flag to user commands which allows the command to be incrementally previewed like `:substitute` when 'inccommand' is set.
2022-05-31 20:55:05 +06:00
zeertzjq
f971536f46
fix(mouse): fix mouse drag position with winbar or border in multigrid
2022-05-19 19:16:49 +08:00
bfredl
17758fe7ad
fix(ui): make winbar work with floats and multigrid
2022-05-18 20:16:18 +02:00
Famiu Haque
bbf58e6bbc
refactor(ui)!: link VertSplit
to Normal
by default
...
Avoids using `gui=reverse` on `VertSplit` and makes window separators
look much nicer by default.
2022-05-15 22:37:35 +06:00
zeertzjq
519e4c4472
test: correct order of arguments to eq() and neq()
2022-04-26 11:38:58 +08:00
zeertzjq
a72f338d76
fix(float): do not switch window before deleting last listed buffer ( #17840 )
...
Just allow close_windows() to close the current window instead.
This fixes wrong working directory or autocommands not being triggered.
2022-03-24 14:53:20 +08:00
zeertzjq
ff82b2785f
fix(float): don't always switch window when deleting last listed buffer ( #17836 )
2022-03-24 11:56:22 +08:00
zeertzjq
2e36117840
test: add test for deleting last listed buffer when there are floats ( #17833 )
2022-03-24 09:28:23 +08:00
zeertzjq
a9359dca37
fix(float): make laststatus=1 behave consistently with floating windows
2022-03-23 09:07:21 +08:00
zeertzjq
3fdb7b528d
fix(float): handle buffer deletion with floating windows
2022-03-23 09:07:21 +08:00
zeertzjq
3539456f49
fix(win_close): count the window the be closed instead of curwin
2022-03-23 09:07:21 +08:00
Rom Grk
85ae04dbfd
fix: close floating windows when calling win_close()
2022-02-10 15:26:40 +00:00
Daniel Steinberg
e8631cb8a6
fix(float): skip non-focusable windows for :windo ( #15378 )
2021-11-11 11:05:18 -07:00
zeertzjq
7ff1bc18a9
fix(float): redraw if w_border_adj changed
2021-10-28 06:32:36 +08:00
zeertzjq
de670f3809
fix(float): fix potential heap corruption in win_redr_border
2021-10-28 06:32:36 +08:00
Björn Linse
810da1a702
fix(mouse): correct dragged position in composed layout
2021-10-04 21:00:42 +02:00
Björn Linse
3beea1fe1b
Merge pull request #15516 from bfredl/keyset
...
refactor(api): Represent option dicts as a structs in C and reduce conversion overhead from lua
2021-10-03 14:31:53 +02:00
Björn Linse
32565922ef
refactor(api): handle option dicts properly
...
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
2021-10-03 10:46:57 +02:00
Sean Dewar
0c06da1f0a
fix(nvim_open_win): crash if autocmds delete buffer/window #15549
...
win_set_buf can trigger autocmds if noautocmd=false. If they close the window,
code afterwards will dereference the freed win_T* wp pointer.
This interaction became possible after commit 1def3d1542
.
The reason deleting curbuf crashes, and not the buf passed to
`nvim_open_win`, is because the float initially edits curbuf (`win_init`)
until it's later set to edit buf (windows from `:new` and `:split <buf>`
behave similiarly: approx. `:split`, then `:buffer <buf>`).
`do_buffer` closes windows when their edited buffer is deleted (unless
it's the only window; N/A for floats), so the float closes when curbuf
is deleted, so we need to check `win_valid` after `win_set_buf` too.
Closes #15548
2021-10-02 19:10:59 -07:00
zeertzjq
b3e815094b
fix(float)!: always anchor to corner of window including border #15832
...
N, W, S, E are all inclusive, i.e., always anchor to the exact corner of the
window (including border). This line may also need change in this case (change
0 to -1):
This is most consistent and easiest to reason about, especially with GUIs whose
border do not need to have width/height of 1/1 in cell units.
Fix #15789
2021-10-02 17:36:24 -07:00
Björn Linse
cd4ec810e9
Merge pull request #14770 from andrew-pa/fix13403
...
Fix relative float positioning
2021-09-12 09:23:47 +02:00
Yatao Li
086631cd92
feat(api): win_viewport also sends line_count #15613
2021-09-10 19:19:39 -07:00
andrew-pa
9065730680
fix(windowing): positioning of relative floats
...
Fix relative floating windows so that they open in the correct position
relative to each other. Also make sure that their positions are correct
immediately after creation without a redraw.
2021-09-08 10:31:47 -06:00
Justin M. Keyes
6751d6254b
refactor(tests): use assert_alive() #15546
2021-09-01 09:42:53 -07:00
Gregory Anders
d8ab8cccd0
test: update tests to work with 'hidden'
2021-08-18 12:17:12 -06:00
Sirisak Lueangsaksri
c8f57f6ded
fix(sign): reset auto sign column with minimum in float win minimal style
2021-08-09 11:09:22 +07:00
Sean Dewar
5f1b728621
fix(api/win_get_config): include z-index
2021-06-19 17:17:17 +01:00
Christian Clason
5b6edc852f
feat(float): add rounded borders preset
...
Add `borders = "rounded"` preset for `nvim_open_win`, equivalent to
border = {"╭", "─", "╮", "│", "╯", "─", "╰", "│"}
Also add undocumented "solid" preset to docs.
2021-06-14 11:10:57 +02:00
Serg Tereshchenko
8d23941af8
fix(ui): Fix pum incorrect position in multigrid mode
...
Refs #12985
2021-06-12 14:34:02 +02:00
Björn Linse
0cd1430316
Merge pull request #14468 from bfredl/zindex
...
[WIP] z-index!
2021-05-15 14:44:22 +02:00
Björn Linse
edb5864a29
floats: z-index
2021-05-15 13:56:27 +02:00
Jan Edmund Lazo
dad725d5e5
vim-patch:8.1.1967: line() only works for the current window
...
Problem: Line() only works for the current window.
Solution: Add an optional argument for the window to use.
8e0a8e7eb7
2021-05-12 19:13:28 -04:00
Jan Edmund Lazo
5165513198
Merge pull request #13664 from ivechan/win_exectute
...
vim-patch:8.1.{1418,1425,1832,2124},8.2.{0137, 2340}
2021-05-07 08:34:28 -04:00
jing
f6518e5516
vim-patch:8.1.1418: win_execute() is not implemented yet
...
Problem: Win_execute() is not implemented yet.
Solution: Implement it.
868b7b6712
2021-05-06 23:44:47 +08:00