@@ -392,7 +392,14 @@ impl EditorView {
392 if range.head > range.anchor {
392 if range.head > range.anchor {
393 // Standard case.
393 // Standard case.
394 let cursor_start = prev_grapheme_boundary(text, range.head);
394 let cursor_start = prev_grapheme_boundary(text, range.head);
395+ // non block cursors look like they exclude the cursor
397+ if selection_is_primary && !cursor_is_block && mode != Mode::Insert {
395− spans.push((selection_scope, range.anchor..cursor_start));
402+ spans.push((selection_scope, range.anchor..selection_end));
396 if !selection_is_primary || cursor_is_block {
403 if !selection_is_primary || cursor_is_block {
397 spans.push((cursor_scope, cursor_start..range.head));
404 spans.push((cursor_scope, cursor_start..range.head));
@@ -402,7 +409,16 @@ impl EditorView {
402 if !selection_is_primary || cursor_is_block {
409 if !selection_is_primary || cursor_is_block {
403 spans.push((cursor_scope, range.head..cursor_end));
410 spans.push((cursor_scope, range.head..cursor_end));
412+ // non block cursors look like they exclude the cursor
413+ let selection_start = if selection_is_primary
415+ && !(mode == Mode::Insert && cursor_end == range.anchor)
405− spans.push((selection_scope, cursor_end..range.anchor));
421+ spans.push((selection_scope, selection_start..range.anchor));