| 62 | } |
| 63 | |
| 64 | export function getCursorStyle(cursorType: VSCodeVimCursorType) { |
| 65 | switch (cursorType) { |
| 66 | case VSCodeVimCursorType.Block: |
| 67 | return vscode.TextEditorCursorStyle.Block; |
| 68 | case VSCodeVimCursorType.Line: |
| 69 | return vscode.TextEditorCursorStyle.Line; |
| 70 | case VSCodeVimCursorType.LineThin: |
| 71 | return vscode.TextEditorCursorStyle.LineThin; |
| 72 | case VSCodeVimCursorType.Underline: |
| 73 | return vscode.TextEditorCursorStyle.Underline; |
| 74 | case VSCodeVimCursorType.UnderlineThin: |
| 75 | return vscode.TextEditorCursorStyle.UnderlineThin; |
| 76 | case VSCodeVimCursorType.TextDecoration: |
| 77 | return vscode.TextEditorCursorStyle.LineThin; |
| 78 | case VSCodeVimCursorType.Native: |
| 79 | default: |
| 80 | return vscode.TextEditorCursorStyle.Block; |
| 81 | } |
| 82 | } |
| 83 | |
| 84 | export function visualBlockGetTopLeftPosition(start: Position, stop: Position): Position { |
| 85 | return new Position(Math.min(start.line, stop.line), Math.min(start.character, stop.character)); |