Skip to content

Commit

Permalink
Adjust timing to start editing item
Browse files Browse the repository at this point in the history
  • Loading branch information
1024jp committed Aug 16, 2024
1 parent 949d8d5 commit a6b9882
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions CotEditor/Sources/FileBrowserViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -465,6 +465,9 @@ extension FileBrowserViewController: NSTextFieldDelegate {

func control(_ control: NSControl, textShouldBeginEditing fieldEditor: NSText) -> Bool {

// start editing only when the row has already been selected
guard self.outlineView.row(for: control) == self.outlineView.selectedRow else { return false }

let row = self.outlineView.row(for: control)

guard let node = self.outlineView.item(atRow: row) as? FileNode else { return false }
Expand Down

0 comments on commit a6b9882

Please sign in to comment.