Skip to content

Commit c21d25e

Browse files
authored
Bugfix: bring back the insert mode cursor (#1476)
1 parent fef6e7d commit c21d25e

File tree

3 files changed

+7
-0
lines changed

3 files changed

+7
-0
lines changed

src/Feature/Editor/CursorView.re

+4
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ let render =
66
(
77
~context: Draw.context,
88
~buffer,
9+
~mode: Vim.Mode.t,
910
~isActiveSplit,
1011
~cursorPosition: Location.t,
1112
~theme: Theme.t,
@@ -48,6 +49,9 @@ let render =
4849
~height,
4950
~color=foreground,
5051
);
52+
} else if (mode == Insert) {
53+
let width = 2.;
54+
Draw.rect(~context, ~x, ~y, ~width, ~height, ~color=foreground);
5155
} else {
5256
let width = float(characterWidth) *. context.charWidth;
5357
Draw.rect(~context, ~x, ~y, ~width, ~height, ~color=foreground);

src/Feature/Editor/EditorSurface.re

+1
Original file line numberDiff line numberDiff line change
@@ -204,6 +204,7 @@ let make =
204204
definition
205205
bufferSyntaxHighlights
206206
bottomVisibleLine
207+
mode
207208
isActiveSplit
208209
gutterWidth
209210
bufferWidthInCharacters={layout.bufferWidthInCharacters}

src/Feature/Editor/SurfaceView.re

+2
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ let%component make =
6363
~definition,
6464
~bufferSyntaxHighlights,
6565
~bottomVisibleLine,
66+
~mode,
6667
~isActiveSplit,
6768
~gutterWidth,
6869
~bufferWidthInCharacters,
@@ -180,6 +181,7 @@ let%component make =
180181
CursorView.render(
181182
~context,
182183
~buffer,
184+
~mode,
183185
~isActiveSplit,
184186
~cursorPosition,
185187
~theme,

0 commit comments

Comments
 (0)