Skip to content

Commit

Permalink
Bugfix: bring back the insert mode cursor (#1476)
Browse files Browse the repository at this point in the history
  • Loading branch information
glennsl authored Mar 16, 2020
1 parent fef6e7d commit c21d25e
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/Feature/Editor/CursorView.re
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ let render =
(
~context: Draw.context,
~buffer,
~mode: Vim.Mode.t,
~isActiveSplit,
~cursorPosition: Location.t,
~theme: Theme.t,
Expand Down Expand Up @@ -48,6 +49,9 @@ let render =
~height,
~color=foreground,
);
} else if (mode == Insert) {
let width = 2.;
Draw.rect(~context, ~x, ~y, ~width, ~height, ~color=foreground);
} else {
let width = float(characterWidth) *. context.charWidth;
Draw.rect(~context, ~x, ~y, ~width, ~height, ~color=foreground);
Expand Down
1 change: 1 addition & 0 deletions src/Feature/Editor/EditorSurface.re
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,7 @@ let make =
definition
bufferSyntaxHighlights
bottomVisibleLine
mode
isActiveSplit
gutterWidth
bufferWidthInCharacters={layout.bufferWidthInCharacters}
Expand Down
2 changes: 2 additions & 0 deletions src/Feature/Editor/SurfaceView.re
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ let%component make =
~definition,
~bufferSyntaxHighlights,
~bottomVisibleLine,
~mode,
~isActiveSplit,
~gutterWidth,
~bufferWidthInCharacters,
Expand Down Expand Up @@ -180,6 +181,7 @@ let%component make =
CursorView.render(
~context,
~buffer,
~mode,
~isActiveSplit,
~cursorPosition,
~theme,
Expand Down

0 comments on commit c21d25e

Please sign in to comment.