From 19d2c96034cc3f91bf516bd11b70b58959d7904c Mon Sep 17 00:00:00 2001 From: Allan Odgaard Date: Wed, 22 Apr 2020 11:27:26 +0700 Subject: [PATCH] =?UTF-8?q?Don=E2=80=99t=20update=20text=20field=20when=20?= =?UTF-8?q?dismissing=20find=20history=20pop-up=20with=20escape?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Frameworks/OakAppKit/src/OakPasteboardSelector.mm | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Frameworks/OakAppKit/src/OakPasteboardSelector.mm b/Frameworks/OakAppKit/src/OakPasteboardSelector.mm index cbe644fc..a73c1043 100644 --- a/Frameworks/OakAppKit/src/OakPasteboardSelector.mm +++ b/Frameworks/OakAppKit/src/OakPasteboardSelector.mm @@ -136,6 +136,7 @@ static size_t line_count (std::string const& text) } - (void)setTableView:(NSTableView*)aTableView; @property (nonatomic) BOOL shouldClose; +@property (nonatomic) BOOL shouldCancel; @end @implementation OakPasteboardSelectorTableViewHelper @@ -234,7 +235,8 @@ static size_t line_count (std::string const& text) - (void)cancel:(id)sender { - _shouldClose = YES; + _shouldCancel = YES; + _shouldClose = YES; } - (void)doCommandBySelector:(SEL)aSelector @@ -335,7 +337,7 @@ static size_t line_count (std::string const& text) [parentWindow removeChildWindow:window]; [window orderOut:self]; - return [tableView selectedRow]; + return tableViewHelper.shouldCancel ? -1 : [tableView selectedRow]; } - (void)setWidth:(CGFloat)width;