Skip to content

Commit cb46f59

Browse files
author
WebCoder49
committed
Fix issue #24, point 5
1 parent 509e3b2 commit cb46f59

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

plugins/indent.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,8 @@
3939

4040
for (let i = 0; i < lines.length; i++) {
4141
// console.log(lines[i], ": start", selection_start, letter_i + lines[i].length + 1, "&& end", selection_end , letter_i + 1)
42-
if(selection_start <= letter_i+lines[i].length && selection_end >= letter_i + 1) { // + 1 so newlines counted
42+
if((selection_start <= letter_i+lines[i].length && selection_end >= letter_i + 1)
43+
|| (selection_start == selection_end && selection_start <= letter_i+lines[i].length+1 && selection_end >= letter_i)) { // + 1 so newlines counted
4344
// Starts before or at last char and ends after or at first char
4445
if(event.shiftKey) {
4546
if(lines[i][0] == "\t") {

0 commit comments

Comments
 (0)