From b4a784336d39504d1447b5299c8d8fa46fa7ab62 Mon Sep 17 00:00:00 2001 From: Ben Fry Date: Fri, 3 Apr 2015 14:24:15 -0400 Subject: [PATCH] remove annoying extra space --- app/src/processing/app/Editor.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/app/src/processing/app/Editor.java b/app/src/processing/app/Editor.java index ff84c6e43..544a0a362 100755 --- a/app/src/processing/app/Editor.java +++ b/app/src/processing/app/Editor.java @@ -2119,8 +2119,9 @@ public abstract class Editor extends JFrame implements RunnerListener { boolean commented = true; for (int i = startLine; commented && (i <= stopLine); i++) { String lineText = textarea.getLineText(i).trim(); - if (lineText.length() == 0) + if (lineText.length() == 0) { continue; //ignore blank lines + } commented = lineText.startsWith(prefix); } @@ -2150,7 +2151,7 @@ public abstract class Editor extends JFrame implements RunnerListener { // add a comment location = textarea.getLineStartOffset(line) + lso; textarea.select(location, location); - textarea.setSelectedText(prefix + " "); //Add a '// ' + textarea.setSelectedText(prefix); } } // Subtract one from the end, otherwise selects past the current line.