File tree Expand file tree Collapse file tree 2 files changed +7
-2
lines changed
java-desktop-util-swing/src/main/java/ec/util/completion/swing Expand file tree Collapse file tree 2 files changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -6,6 +6,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
66
77## [ Unreleased]
88
9+ ### Added
10+
11+ - Trim terms in JAutoCompletion [ #470 ] ( https://github.com/nbbrd/java-desktop-util/issues/470 )
12+
913### Changed
1014
1115- Modernize use of NIO API
Original file line number Diff line number Diff line change @@ -140,11 +140,12 @@ public void close() {
140140
141141 @ Override
142142 public void search (@ NonNull String term ) {
143- if (!enabled || term .length () < minLength ) {
143+ String trimmedTerm = term .trim ();
144+ if (!enabled || trimmedTerm .length () < minLength ) {
144145 close ();
145146 return ;
146147 }
147- search (getRequest (term ));
148+ search (getRequest (trimmedTerm ));
148149 }
149150
150151 private Request getRequest (String term ) {
You can’t perform that action at this time.
0 commit comments