Skip to content

Commit 6ed11f4

Browse files
committed
Merge branch 'master' into featurefixbadquotes
2 parents 10162bb + 8a66da5 commit 6ed11f4

File tree

13 files changed

+774
-76
lines changed

13 files changed

+774
-76
lines changed

app/src/processing/app/Base.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,9 +55,9 @@
5555
public class Base {
5656
// Added accessors for 0218 because the UpdateCheck class was not properly
5757
// updating the values, due to javac inlining the static final values.
58-
static private final int REVISION = 262;
58+
static private final int REVISION = 263;
5959
/** This might be replaced by main() if there's a lib/version.txt file. */
60-
static private String VERSION_NAME = "0262"; //$NON-NLS-1$
60+
static private String VERSION_NAME = "0263"; //$NON-NLS-1$
6161
/** Set true if this a proper release rather than a numbered revision. */
6262

6363
/**

app/src/processing/app/Language.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,7 @@ static private String[] listSupported() {
9595
"el", // Greek
9696
"es", // Spanish
9797
"fr", // French, Français
98+
"it", // Italiano, Italian
9899
"ja", // Japanese
99100
"ko", // Korean
100101
"nl", // Dutch, Nederlands

app/src/processing/app/ui/Editor.java

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2136,13 +2136,26 @@ protected void handleCommentUncomment() {
21362136

21372137
// log("Commented: " + commented);
21382138

2139-
// This is the line start offset of the first line, which is added to
2140-
// all other lines while adding a comment. Required when commenting
2139+
// This is the min line start offset of the selection, which is added to
2140+
// all lines while adding a comment. Required when commenting
21412141
// lines which have uneven whitespaces in the beginning. Makes the
21422142
// commented lines look more uniform.
21432143
int lso = Math.abs(textarea.getLineStartNonWhiteSpaceOffset(startLine)
21442144
- textarea.getLineStartOffset(startLine));
21452145

2146+
if (!commented) {
2147+
// get min line start offset of all selected lines
2148+
for (int line = startLine+1; line <= stopLine; line++) {
2149+
String lineText = textarea.getLineText(line);
2150+
if (lineText.trim().length() == 0) {
2151+
continue; //ignore blank lines
2152+
}
2153+
int so = Math.abs(textarea.getLineStartNonWhiteSpaceOffset(line)
2154+
- textarea.getLineStartOffset(line));
2155+
lso = Math.min(lso, so);
2156+
}
2157+
}
2158+
21462159
for (int line = startLine; line <= stopLine; line++) {
21472160
int location = textarea.getLineStartNonWhiteSpaceOffset(line);
21482161
String lineText = textarea.getLineText(line);

0 commit comments

Comments
 (0)