Skip to content

Commit

Permalink
Make it possible to disable autocompletion in the search bar (#3600)
Browse files Browse the repository at this point in the history
  • Loading branch information
lenhard authored and LinusDietz committed Jan 3, 2018
1 parent f61f641 commit 193bbbc
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ We refer to [GitHub issues](https://github.com/JabRef/jabref/issues) by using `#

### Fixed
- We fixed the missing dot in the name of an exported file. [#3576](https://github.com/JabRef/jabref/issues/3576)
- Autocompletion in the search bar can now be disabled via the preferences [#3598](https://github.com/JabRef/jabref/issues/3598)

### Removed
- We removed the Look and Feels from jgoodies, because these are not compatible with Java 9
Expand Down Expand Up @@ -115,7 +116,7 @@ We refer to [GitHub issues](https://github.com/JabRef/jabref/issues) by using `#
- We fixed an issue where the same Java Look and Feel would be listed more than once in the Preferences. [#3391](https://github.com/JabRef/jabref/issues/3391)
- We fixed an issue where errors in citation styles triggered an exception when opening the preferences dialog. [#3389](https://github.com/JabRef/jabref/issues/3389)
- We fixed an issue where entries were displayed twice after insertion into a shared database. [#3164](https://github.com/JabRef/jabref/issues/3164)
- We improved the auto link algorithm so that files starting with a similar key are no longer found (e.g, `Einstein1902` vs `Einstein1902a`). [#3472](https://github.com/JabRef/jabref/issues/3472)
- We improved the auto link algorithm so that files starting with a similar key are no longer found (e.g, `Einstein1902` vs `Einstein1902a`). [#3472](https://github.com/JabRef/jabref/issues/3472)
- We fixed an issue where special fields (such as `printed`) could not be cleared when syncing special fields via the keywords. [#3432](https://github.com/JabRef/jabref/issues/3432)
- We fixed an issue where the tooltip of the global search bar showed html tags instead of formatting the text. [#3381](https://github.com/JabRef/jabref/issues/3381)
- We fixed an issue where timestamps were not updated for changed entries. [#2810](https://github.com/JabRef/jabref/issues/2810)
Expand Down
10 changes: 6 additions & 4 deletions src/main/java/org/jabref/gui/search/GlobalSearchBar.java
Original file line number Diff line number Diff line change
Expand Up @@ -359,10 +359,12 @@ private void informUserAboutInvalidSearchQuery() {
}

public void setAutoCompleter(AutoCompleteSuggestionProvider<Author> searchCompleter) {
AutoCompletionTextInputBinding.autoComplete(searchField,
searchCompleter,
new PersonNameStringConverter(false, false, AutoCompleteFirstNameMode.BOTH),
new AppendPersonNamesStrategy());
if (Globals.prefs.getAutoCompletePreferences().shouldAutoComplete()) {
AutoCompletionTextInputBinding.autoComplete(searchField,
searchCompleter,
new PersonNameStringConverter(false, false, AutoCompleteFirstNameMode.BOTH),
new AppendPersonNamesStrategy());
}
}

public SearchQueryHighlightObservable getSearchQueryHighlightObservable() {
Expand Down

0 comments on commit 193bbbc

Please sign in to comment.