mirror of
https://github.com/neovim/neovim.git
synced 2025-10-07 02:16:31 +00:00
refactor(marktree): unpaired marktree_get_alt() returns itself
Avoids checking for invalid mark at callsite.
This commit is contained in:
@@ -151,7 +151,7 @@ static Array extmark_to_array(MTPair extmark, bool id, bool add_dict, bool hl_na
|
||||
|
||||
PUT(dict, "right_gravity", BOOLEAN_OBJ(mt_right(start)));
|
||||
|
||||
if (extmark.end_pos.row >= 0) {
|
||||
if (mt_paired(start)) {
|
||||
PUT(dict, "end_row", INTEGER_OBJ(extmark.end_pos.row));
|
||||
PUT(dict, "end_col", INTEGER_OBJ(extmark.end_pos.col));
|
||||
PUT(dict, "end_right_gravity", BOOLEAN_OBJ(extmark.end_right_gravity));
|
||||
|
Reference in New Issue
Block a user