Skip to content

Commit f483416

Browse files
author
Matthew Chan
committed
Comment out debug code.
1 parent 7ae5555 commit f483416

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

main.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,13 @@ export default class ToggleCode extends Plugin {
4141
}
4242

4343
getTokenAtCursor(editor: CodeMirror.Editor) {
44+
// TODO: Use findWordAt instead of getTokenAt?
4445
let cursor = editor.getCursor();
4546
let token = editor.getTokenAt(cursor);
47+
48+
// let word = editor.findWordAt(cursor);
49+
// console.log('word', editor.getRange(word.anchor, word.head));
50+
4651
if (token.start > 0 && token.end < editor.getLine(cursor.line).length) {
4752
let s = editor.getRange({line : cursor.line, ch : token.start - 1},
4853
{line : cursor.line, ch : token.end + 1});
@@ -99,7 +104,6 @@ export default class ToggleCode extends Plugin {
99104

100105
// Set selection to the modified text.
101106
let ch_diff = replacement.length - selectedText.content.length;
102-
103107
if (wasSelection) {
104108
editor.setSelection(
105109
selectedText.start,

0 commit comments

Comments
 (0)