Commit 03ac32a
authored
fix(border): Failing to display if row negative (#240)
This commit aims to fix an issue with the Border component, which
makes it impossible to draw the top and bottom lines and makes the
middle line replace the former, if the row is a negative value.
The issues stems from an if condition which prevents top line from
being created, if the row has a negative or 0 value. This also
makes it impossible to use the `plenary.popup` cursor-relative
positioning, as a value such as 'cursor-2' would break the popup.
It makes it so the if statement conditioning the rendering of a
topline takes into account the boundaries of the current window,
whether the position is absolute or cursor-relative. It also removes
the top thickness of the hidden border, as pointed out by @l-kershaw.
Finally, this commit ensures that cursor-relative position takes into
account the editor-relative position of the cursor, not only the window
one, as it lead to problems when not setting a certain `showtabline`.
It also created an undesired behaviour of "pushing" the popup down, in
order to make room for the topline.1 parent edb76cc commit 03ac32a
1 file changed
Lines changed: 13 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
73 | 73 | | |
74 | 74 | | |
75 | 75 | | |
76 | | - | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
77 | 87 | | |
78 | 88 | | |
79 | 89 | | |
| |||
92 | 102 | | |
93 | 103 | | |
94 | 104 | | |
| 105 | + | |
| 106 | + | |
95 | 107 | | |
96 | 108 | | |
97 | 109 | | |
| |||
0 commit comments