diff options
author | zeertzjq <zeertzjq@outlook.com> | 2021-10-03 08:36:24 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-10-02 17:36:24 -0700 |
commit | b3e815094bad6c28b758bc7538bf1b13936660fc (patch) | |
tree | 5fcbc50b6b1d8d0b7ec31cde94031914cc676b01 /src/nvim/api/vim.c | |
parent | c5e8c39102afb29213c5f4ead91d08123f19e7a9 (diff) | |
download | rneovim-b3e815094bad6c28b758bc7538bf1b13936660fc.tar.gz rneovim-b3e815094bad6c28b758bc7538bf1b13936660fc.tar.bz2 rneovim-b3e815094bad6c28b758bc7538bf1b13936660fc.zip |
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
Diffstat (limited to 'src/nvim/api/vim.c')
-rw-r--r-- | src/nvim/api/vim.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/nvim/api/vim.c b/src/nvim/api/vim.c index 3be45d0cf7..8e0502e03b 100644 --- a/src/nvim/api/vim.c +++ b/src/nvim/api/vim.c @@ -1360,7 +1360,9 @@ void nvim_chan_send(Integer chan, String data, Error *err) /// - `bufpos`: Places float relative to buffer text (only when /// relative="win"). Takes a tuple of zero-indexed [line, column]. /// `row` and `col` if given are applied relative to this -/// position, else they default to `row=1` and `col=0` +/// position, else they default to: +/// - `row=1` and `col=0` if `anchor` is "NW" or "NE" +/// - `row=0` and `col=0` if `anchor` is "SW" or "SE" /// (thus like a tooltip near the buffer text). /// - `row`: Row position in units of "screen cell height", may be fractional. /// - `col`: Column position in units of "screen cell width", may be |