Commit f73ec14
fix(files): ensure current win is within explorer after closing any win
Details:
- Closing the current window will temporarily switch focus to some other
window (probably the first "normal" window in the tabpage). This can
be a problem since it triggers all relevant events (like `BufEnter`).
This can manifest in directory buffer being unexpectedly closed if
current window is at depth that will be not shown
(`go_in`+`go_in`+`trim_left`).
A general rule of thumb is that current window should be set before
closing any window.
- This also removes a window close logic in explorer normalization since
it seems to be redundant: an overlapping actions will be done later
during explorer refresh.
Resolve #2478
Co-authored-by: abeldekat <58370433+abeldekat@users.noreply.github.com>1 parent a12fe93 commit f73ec14
2 files changed
Lines changed: 30 additions & 15 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1569 | 1569 | | |
1570 | 1570 | | |
1571 | 1571 | | |
| 1572 | + | |
| 1573 | + | |
| 1574 | + | |
| 1575 | + | |
| 1576 | + | |
| 1577 | + | |
1572 | 1578 | | |
1573 | 1579 | | |
1574 | 1580 | | |
1575 | 1581 | | |
1576 | 1582 | | |
1577 | 1583 | | |
1578 | | - | |
1579 | | - | |
1580 | | - | |
1581 | | - | |
1582 | | - | |
1583 | 1584 | | |
1584 | 1585 | | |
1585 | 1586 | | |
| |||
1634 | 1635 | | |
1635 | 1636 | | |
1636 | 1637 | | |
1637 | | - | |
1638 | | - | |
1639 | 1638 | | |
1640 | | - | |
1641 | | - | |
1642 | | - | |
1643 | | - | |
1644 | | - | |
1645 | | - | |
1646 | | - | |
1647 | | - | |
| 1639 | + | |
1648 | 1640 | | |
1649 | 1641 | | |
1650 | 1642 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6369 | 6369 | | |
6370 | 6370 | | |
6371 | 6371 | | |
| 6372 | + | |
| 6373 | + | |
| 6374 | + | |
| 6375 | + | |
| 6376 | + | |
| 6377 | + | |
| 6378 | + | |
| 6379 | + | |
| 6380 | + | |
| 6381 | + | |
| 6382 | + | |
| 6383 | + | |
| 6384 | + | |
| 6385 | + | |
| 6386 | + | |
| 6387 | + | |
| 6388 | + | |
| 6389 | + | |
| 6390 | + | |
| 6391 | + | |
| 6392 | + | |
| 6393 | + | |
| 6394 | + | |
6372 | 6395 | | |
6373 | 6396 | | |
6374 | 6397 | | |
| |||
0 commit comments