浏览代码

cursor width at lease 1

xuty 4 年之前
父节点
当前提交
3296e1078e
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      lib/frontend/terminal_view.dart

+ 1 - 1
lib/frontend/terminal_view.dart

@@ -521,7 +521,7 @@ class TerminalPainter extends CustomPainter {
     }
 
     final width = charSize.cellWidth *
-        terminal.buffer.currentLine.cellGetWidth(terminal.cursorX);
+        terminal.buffer.currentLine.cellGetWidth(terminal.cursorX).clamp(1, 2);
 
     final offsetX = charSize.cellWidth * terminal.cursorX;
     final offsetY = charSize.cellHeight * screenCursorY;