Skip to content

Commit 7134045

Browse files
committed
fix spurious selection when reloading the browser on macOS
https://developer.apple.com/documentation/appkit/nstableview/1527288-beginupdates
1 parent ffd9b2e commit 7134045

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/listview.cpp

+5
Original file line numberDiff line numberDiff line change
@@ -315,6 +315,11 @@ void ListView::endEdit()
315315
void ListView::clear()
316316
{
317317
ListView_DeleteAllItems(handle());
318+
#ifdef __APPLE__
319+
// NSTableView preverves the previous selection when removing rows after
320+
// beginUpdates is called (via WM_SETREDRAW=0 in SWELL)
321+
unselectAll();
322+
#endif
318323

319324
m_rows.clear();
320325
}

0 commit comments

Comments
 (0)