File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -462,14 +462,14 @@ impl DocumentManager {
462462 let path_str = tab. file_path . to_string_lossy ( ) . to_string ( ) ;
463463 let bookmarks = config. get_bookmarks ( & path_str) ;
464464 drop ( config) ;
465+
465466 let mut has_note = false ;
466467 let mut has_bookmark = false ;
467468 for bm in & bookmarks {
468- let triggered = if position > prev {
469- bm. start > prev && bm. start <= position
470- } else {
471- bm. start >= position && bm. start < prev
472- } ;
469+ let was_inside = if bm. start == bm. end { prev == bm. start } else { prev >= bm. start && prev < bm. end } ;
470+ let is_inside =
471+ if bm. start == bm. end { position == bm. start } else { position >= bm. start && position < bm. end } ;
472+ let triggered = is_inside && !was_inside;
473473 if triggered {
474474 if bm. note . is_empty ( ) {
475475 has_bookmark = true ;
You can’t perform that action at this time.
0 commit comments