File tree Expand file tree Collapse file tree 2 files changed +11
-4
lines changed
java/src/processing/mode/java Expand file tree Collapse file tree 2 files changed +11
-4
lines changed Original file line number Diff line number Diff line change @@ -277,9 +277,16 @@ static private List<JavaProblem> checkForCurlyQuotes(PreprocSketch ps) {
277277 String q = matcher .group ();
278278 int tabStart = in .startTabOffset + offset ;
279279 int tabStop = tabStart + 1 ;
280+ int line = ps .tabOffsetToTabLine (in .tabIndex , tabStart );
281+
280282 // Prevent duplicate problems
281- if (problems .stream ().noneMatch (p -> p .getStartOffset () == tabStart )) {
282- int line = ps .tabOffsetToTabLine (in .tabIndex , tabStart );
283+ boolean isDupe = problems .stream ()
284+ .filter (p -> p .getTabIndex () == in .tabIndex )
285+ .filter (p -> p .getLineNumber () == line )
286+ .findAny ()
287+ .isPresent ();
288+
289+ if (isDupe ) {
283290 String message ;
284291 if (iproblem .getID () == IProblem .UnterminatedString ) {
285292 message = Language .interpolate ("editor.status.unterm_string_curly" , q );
Original file line number Diff line number Diff line change @@ -233,13 +233,13 @@ void updateProblems(List<Problem> problems) {
233233 new Position (
234234 prob .getLineNumber (),
235235 PdeAdapter
236- .toLineCol (code .getProgram (), prob .getStartOffset ())
236+ .toLineCol (code .getProgram (), prob .getTabStartOffset (). get ())
237237 .col - 1
238238 ),
239239 new Position (
240240 prob .getLineNumber (),
241241 PdeAdapter
242- .toLineCol (code .getProgram (), prob .getStopOffset ())
242+ .toLineCol (code .getProgram (), prob .getTabStopOffset (). get ())
243243 .col - 1
244244 )
245245 ),
You can’t perform that action at this time.
0 commit comments