Skip to content

Commit 5121416

Browse files
committed
fix(completion): adjust 'pumborder' computation to follow latest Nightly
Details: - Latest Nightly has merged a (very cool) PR to have scrollbar rendered on the right pumborder. This affects how info window coordinates should be computed: not separately for 'pumborder' and scrollbar, but together.
1 parent 79e375f commit 5121416

11 files changed

+306
-165
lines changed

lua/mini/completion.lua

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1544,8 +1544,8 @@ H.info_window_options = function()
15441544
-- Compute position
15451545
local event = H.info.event
15461546
local left_to_pum = event.col - 1
1547-
local pumborder_offset = (pumborder == '' or pumborder == 'none') and 0 or 2
1548-
local right_to_pum = event.col + event.width + (event.scrollbar and 1 or 0) + pumborder_offset
1547+
local offset = (pumborder == '' or pumborder == 'none') and (event.scrollbar and 1 or 0) or 2
1548+
local right_to_pum = event.col + event.width + offset
15491549

15501550
local border_offset = border == 'none' and 0 or 2
15511551
local space_left = left_to_pum - border_offset
Lines changed: 32 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,33 @@
1-
--|---------|---------|---------|--
2-
01| January
3-
02|~ ┌──────────────────┐┌…fo
4-
03|~ │ January Text ││Mont
5-
04|~ │ June Function ││h
6-
05|~ │ July Function ││#01 │
7-
06|~ └──────────────────┘└────┘
8-
07|~
9-
08|~
10-
09|~
11-
10|~
12-
11|~
13-
12|~
14-
13|~
15-
14|[No Name] 1,15
16-
15|-- INSERT --
1+
--|---------|---------|---------|---
2+
01| January
3+
02|~ ┌──────────────────┐┌…nfo
4+
03|~ │ January Text ││Month
5+
04|~ │ June Function ││ #01
6+
05|~ │ July Function │└─────┘
7+
06|~ └──────────────────┘
8+
07|~
9+
08|~
10+
09|~
11+
10|~
12+
11|~
13+
12|~
14+
13|~
15+
14|[No Name] 1,15
16+
15|-- INSERT --
1717

18-
--|---------|---------|---------|--
19-
01|00000000000000000000000000000000
20-
02|11111122222222222222222222344443
21-
03|11111125555555555555555552366663
22-
04|11111122222222222222222222366663
23-
05|11111122222222222222222222366663
24-
06|11111122222222222222222222333333
25-
07|11111111111111111111111111111111
26-
08|11111111111111111111111111111111
27-
09|11111111111111111111111111111111
28-
10|11111111111111111111111111111111
29-
11|11111111111111111111111111111111
30-
12|11111111111111111111111111111111
31-
13|11111111111111111111111111111111
32-
14|77777777777777777777777777777777
33-
15|88888888888899999999999999999999
18+
--|---------|---------|---------|---
19+
01|000000000000000000000000000000000
20+
02|111111222222222222222222223444443
21+
03|111111255555555555555555523666663
22+
04|111111222222222222222222223666663
23+
05|111111222222222222222222223333333
24+
06|111111222222222222222222221111111
25+
07|111111111111111111111111111111111
26+
08|111111111111111111111111111111111
27+
09|111111111111111111111111111111111
28+
10|111111111111111111111111111111111
29+
11|111111111111111111111111111111111
30+
12|111111111111111111111111111111111
31+
13|111111111111111111111111111111111
32+
14|777777777777777777777777777777777
33+
15|888888888888999999999999999999999
Lines changed: 32 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,33 @@
1-
--|---------|---------|---------|--
2-
01| January
3-
02|┌…nfo ┐┌──────────────────┐
4-
03|│Month││ January Text │
5-
04|│ #01 ││ June Function │
6-
05|└─────┘│ July Function │
7-
06|~ └──────────────────┘
8-
07|~
9-
08|~
10-
09|~
11-
10|~
12-
11|~
13-
12|~
14-
13|~
15-
14|[No Name] 1,16
16-
15|-- INSERT --
1+
--|---------|---------|---------|---
2+
01| January
3+
02|┌…nfo ┐┌──────────────────┐
4+
03|│Month││ January Text │
5+
04|│ #01 ││ June Function │
6+
05|└─────┘│ July Function │
7+
06|~ └──────────────────┘
8+
07|~
9+
08|~
10+
09|~
11+
10|~
12+
11|~
13+
12|~
14+
13|~
15+
14|[No Name] 1,16
16+
15|-- INSERT --
1717

18-
--|---------|---------|---------|--
19-
01|00000000000000000000000000000000
20-
02|12222213333333333333333333344444
21-
03|15555513666666666666666666344444
22-
04|15555513333333333333333333344444
23-
05|11111113333333333333333333344444
24-
06|44444443333333333333333333344444
25-
07|44444444444444444444444444444444
26-
08|44444444444444444444444444444444
27-
09|44444444444444444444444444444444
28-
10|44444444444444444444444444444444
29-
11|44444444444444444444444444444444
30-
12|44444444444444444444444444444444
31-
13|44444444444444444444444444444444
32-
14|77777777777777777777777777777777
33-
15|88888888888899999999999999999999
18+
--|---------|---------|---------|---
19+
01|000000000000000000000000000000000
20+
02|122222133333333333333333333444444
21+
03|155555136666666666666666663444444
22+
04|155555133333333333333333333444444
23+
05|111111133333333333333333333444444
24+
06|444444433333333333333333333444444
25+
07|444444444444444444444444444444444
26+
08|444444444444444444444444444444444
27+
09|444444444444444444444444444444444
28+
10|444444444444444444444444444444444
29+
11|444444444444444444444444444444444
30+
12|444444444444444444444444444444444
31+
13|444444444444444444444444444444444
32+
14|777777777777777777777777777777777
33+
15|888888888888999999999999999999999
Lines changed: 32 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,33 @@
1-
--|---------|---------|---------|--
2-
01|January
3-
02|January Text ┌ Info ───┐
4-
03|June Function │Month #01│
5-
04|July Function └─────────┘
6-
05|~
7-
06|~
8-
07|~
9-
08|~
10-
09|~
11-
10|~
12-
11|~
13-
12|~
14-
13|~
15-
14|[No Name] 1,8
16-
15|-- INSERT --
1+
--|---------|---------|---------|---
2+
01|January
3+
02|January Text ┌ Info ───┐
4+
03|June Function │Month #01│
5+
04|July Function └─────────┘
6+
05|~
7+
06|~
8+
07|~
9+
08|~
10+
09|~
11+
10|~
12+
11|~
13+
12|~
14+
13|~
15+
14|[No Name] 1,8
16+
15|-- INSERT --
1717

18-
--|---------|---------|---------|--
19-
01|00000000000000000000000000000000
20-
02|11111111111111111233333322224444
21-
03|55555555555555555266666666624444
22-
04|55555555555555555222222222224444
23-
05|44444444444444444444444444444444
24-
06|44444444444444444444444444444444
25-
07|44444444444444444444444444444444
26-
08|44444444444444444444444444444444
27-
09|44444444444444444444444444444444
28-
10|44444444444444444444444444444444
29-
11|44444444444444444444444444444444
30-
12|44444444444444444444444444444444
31-
13|44444444444444444444444444444444
32-
14|77777777777777777777777777777777
33-
15|88888888888899999999999999999999
18+
--|---------|---------|---------|---
19+
01|000000000000000000000000000000000
20+
02|111111111111111112333333222244444
21+
03|555555555555555552666666666244444
22+
04|555555555555555552222222222244444
23+
05|444444444444444444444444444444444
24+
06|444444444444444444444444444444444
25+
07|444444444444444444444444444444444
26+
08|444444444444444444444444444444444
27+
09|444444444444444444444444444444444
28+
10|444444444444444444444444444444444
29+
11|444444444444444444444444444444444
30+
12|444444444444444444444444444444444
31+
13|444444444444444444444444444444444
32+
14|777777777777777777777777777777777
33+
15|888888888888999999999999999999999
Lines changed: 32 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,33 @@
1-
--|---------|---------|---------|--
2-
01|January
3-
02|┌─────────────────┐Month #01
4-
03|│January Text │
5-
04|│June Function │
6-
05|│July Function │
7-
06|└─────────────────┘
8-
07|~
9-
08|~
10-
09|~
11-
10|~
12-
11|~
13-
12|~
14-
13|~
15-
14|[No Name] 1,8
16-
15|-- INSERT --
1+
--|---------|---------|---------|---
2+
01|January
3+
02|┌─────────────────┐Month #01
4+
03|│January Text │
5+
04|│June Function │
6+
05|│July Function │
7+
06|└─────────────────┘
8+
07|~
9+
08|~
10+
09|~
11+
10|~
12+
11|~
13+
12|~
14+
13|~
15+
14|[No Name] 1,8
16+
15|-- INSERT --
1717

18-
--|---------|---------|---------|--
19-
01|00000000000000000000000000000000
20-
02|11111111111111111112222222223333
21-
03|14444444444444444413333333333333
22-
04|11111111111111111113333333333333
23-
05|11111111111111111113333333333333
24-
06|11111111111111111113333333333333
25-
07|33333333333333333333333333333333
26-
08|33333333333333333333333333333333
27-
09|33333333333333333333333333333333
28-
10|33333333333333333333333333333333
29-
11|33333333333333333333333333333333
30-
12|33333333333333333333333333333333
31-
13|33333333333333333333333333333333
32-
14|55555555555555555555555555555555
33-
15|66666666666677777777777777777777
18+
--|---------|---------|---------|---
19+
01|000000000000000000000000000000000
20+
02|111111111111111111122222222233333
21+
03|144444444444444444133333333333333
22+
04|111111111111111111133333333333333
23+
05|111111111111111111133333333333333
24+
06|111111111111111111133333333333333
25+
07|333333333333333333333333333333333
26+
08|333333333333333333333333333333333
27+
09|333333333333333333333333333333333
28+
10|333333333333333333333333333333333
29+
11|333333333333333333333333333333333
30+
12|333333333333333333333333333333333
31+
13|333333333333333333333333333333333
32+
14|555555555555555555555555555555555
33+
15|666666666666777777777777777777777
Lines changed: 32 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,33 @@
1-
--|---------|---------|---------|--
2-
01|January
3-
02|January Text Month #01
4-
03|June Function
5-
04|July Function
6-
05|~
7-
06|~
8-
07|~
9-
08|~
10-
09|~
11-
10|~
12-
11|~
13-
12|~
14-
13|~
15-
14|[No Name] 1,8
16-
15|-- INSERT --
1+
--|---------|---------|---------|---
2+
01|January
3+
02|January Text Month #01
4+
03|June Function
5+
04|July Function
6+
05|~
7+
06|~
8+
07|~
9+
08|~
10+
09|~
11+
10|~
12+
11|~
13+
12|~
14+
13|~
15+
14|[No Name] 1,8
16+
15|-- INSERT --
1717

18-
--|---------|---------|---------|--
19-
01|00000000000000000000000000000000
20-
02|11111111111111111222222222333333
21-
03|44444444444444444333333333333333
22-
04|44444444444444444333333333333333
23-
05|33333333333333333333333333333333
24-
06|33333333333333333333333333333333
25-
07|33333333333333333333333333333333
26-
08|33333333333333333333333333333333
27-
09|33333333333333333333333333333333
28-
10|33333333333333333333333333333333
29-
11|33333333333333333333333333333333
30-
12|33333333333333333333333333333333
31-
13|33333333333333333333333333333333
32-
14|55555555555555555555555555555555
33-
15|66666666666677777777777777777777
18+
--|---------|---------|---------|---
19+
01|000000000000000000000000000000000
20+
02|111111111111111112222222223333333
21+
03|444444444444444443333333333333333
22+
04|444444444444444443333333333333333
23+
05|333333333333333333333333333333333
24+
06|333333333333333333333333333333333
25+
07|333333333333333333333333333333333
26+
08|333333333333333333333333333333333
27+
09|333333333333333333333333333333333
28+
10|333333333333333333333333333333333
29+
11|333333333333333333333333333333333
30+
12|333333333333333333333333333333333
31+
13|333333333333333333333333333333333
32+
14|555555555555555555555555555555555
33+
15|666666666666777777777777777777777
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
--|---------|---------|---------|---
2+
01|January
3+
02|┌──────────────────────┐┌ Info ┐
4+
03|│January Text │Month │
5+
04|│February Text │#01 │
6+
05|│March Method └──────┘
7+
06|│April Method
8+
07|│May Method
9+
08|│June Function
10+
09|│July Function
11+
10|│August Function
12+
11|│September Constructor │
13+
12|│October Constructor │
14+
13|└──────────────────────┘
15+
14|[No Name] 1,8
16+
15|-- INSERT --
17+
18+
--|---------|---------|---------|---
19+
01|000000000000000000000000000000000
20+
02|111111111111111111111111233333324
21+
03|155555555555555555555556277777724
22+
04|111111111111111111111116277777724
23+
05|111111111111111111111116222222224
24+
06|111111111111111111111116444444444
25+
07|111111111111111111111116444444444
26+
08|111111111111111111111116444444444
27+
09|111111111111111111111116444444444
28+
10|111111111111111111111116444444444
29+
11|111111111111111111111111444444444
30+
12|111111111111111111111111444444444
31+
13|111111111111111111111111444444444
32+
14|888888888888888888888888888888888
33+
15|999999999999:::::::::::::::::::::

0 commit comments

Comments
 (0)