Skip to content

Commit

Permalink
Merge branch 'devel'
Browse files Browse the repository at this point in the history
  • Loading branch information
Argent77 committed Apr 8, 2022
2 parents 4d5af02 + 88c2f74 commit 332c47d
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion src/org/infinity/gui/BrowserMenuBar.java
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@
import org.infinity.util.tuples.Couple;

public final class BrowserMenuBar extends JMenuBar implements KeyEventDispatcher {
public static final String VERSION = "v2.2-20220408";
public static final String VERSION = "v2.2-20220408-1";

public static final LookAndFeelInfo DEFAULT_LOOKFEEL =
new LookAndFeelInfo("Metal", "javax.swing.plaf.metal.MetalLookAndFeel");
Expand Down
20 changes: 10 additions & 10 deletions src/org/infinity/util/Table2da.java
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@

import java.util.ArrayList;
import java.util.List;
import java.util.regex.Matcher;
import java.util.regex.Pattern;

import org.infinity.resource.ResourceFactory;
import org.infinity.resource.key.ResourceEntry;
Expand Down Expand Up @@ -203,14 +201,16 @@ private List<Entry> getSplitEntries(String line, int lineIndex) {
List<Entry> retVal = new ArrayList<>();

if (line != null) {
final Pattern pattern = Pattern.compile("\\b\\S+\\b");
final Matcher matcher = pattern.matcher(line);

while (matcher.find()) {
int start = matcher.start();
int end = matcher.end();
String value = line.substring(start, end);
retVal.add(new Entry(this, value, lineIndex, start));
String[] tokens = line.split("\\s+");
int fromIndex = 0;
for (final String token : tokens) {
fromIndex = line.indexOf(token, fromIndex);
if (fromIndex >= 0) {
retVal.add(new Entry(this, token, lineIndex, fromIndex));
fromIndex += token.length();
} else {
break;
}
}
}

Expand Down

0 comments on commit 332c47d

Please sign in to comment.