This repository was archived by the owner on Jul 6, 2021. It is now read-only.
Commit fa12d56
authored
Fix going out of bounds in a buffer
`strict_indexing` was set to `true` in the `nvim_buf_get_lines` call, so when `row` got to the end of the buffer it would cause an error.
Setting `strict_indexing` to `false` caused `line` to be `nil` sometimes, so I added some logic to handle that.1 parent bdef92a commit fa12d56
1 file changed
Lines changed: 15 additions & 12 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
146 | 146 | | |
147 | 147 | | |
148 | 148 | | |
149 | | - | |
150 | | - | |
151 | | - | |
152 | | - | |
153 | | - | |
154 | | - | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
155 | 164 | | |
156 | | - | |
157 | | - | |
158 | | - | |
159 | | - | |
160 | | - | |
161 | | - | |
162 | 165 | | |
163 | 166 | | |
164 | 167 | | |
| |||
0 commit comments