Commit 0022a57
committed
fix: check buffer is valid when getting name
## Details
Issue: #260
When logging info at the buffer level we get the file name for the
buffer to make the logs more useful. However if the buffer is invalid
this call to get file name will throw an exception.
Wrap the call to get file name in a check that buffer is valid. Return
some default string if it is not. Other parts of the ui.update flow will
validate the buffer and window and prevent any actual changes to invalid
buffers.1 parent e41b000 commit 0022a57
File tree
3 files changed
+8
-4
lines changed- doc
- lua/render-markdown
- core
3 files changed
+8
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
128 | 128 | | |
129 | 129 | | |
130 | 130 | | |
131 | | - | |
132 | | - | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
133 | 137 | | |
134 | 138 | | |
135 | 139 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | | - | |
| 7 | + | |
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| |||
0 commit comments