Do not call editColumn if the defaultEditingColumn is < 0

This commit is contained in:
Damiano Galassi committed 2017-11-15 10:17:52 +01:00
1 parent 170146391c
commit c41234299e
1 file changed
+1 -1
+1 -1
View File
@@ -63,7 +63,7 @@ class ExpandedTableView: NSTableView {
guard let key = event.charactersIgnoringModifiers?.utf16.first else { super.keyDown(with: event); return }
if key == NSEnterCharacter || key == NSCarriageReturnCharacter && defaultEditingColumn > 0 {
if (key == NSEnterCharacter || key == NSCarriageReturnCharacter) && defaultEditingColumn > 0 {
editColumn(defaultEditingColumn, row: selectedRow, with: nil, select: true)
}
else if (key == NSDeleteCharacter || key == NSDeleteFunctionKey) && implements(selector: #selector(ExpandedTableViewDelegate.deleteSelection(in:))) {