Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit fcc26de

Browse files
committed
look: add comment on how it currently works
1 parent 69f358a commit fcc26de

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

cmd.go

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,15 @@ func acmd(e event.Cmd) {
150150
case p.Prefix("Edit"):
151151
editcmd(e.To[0], abs, p.Chop())
152152
case p.Prefix("Look"):
153+
// Determine where this command is executed. If it's at the grid or column
154+
// labels, we run Look on all the text.Editors below that point. A column
155+
// runs Look on all planes under the column. A Grid does the same for
156+
// all columns.
157+
//
158+
// Use the track data structure to determine what Editor was last selected
159+
// and use that as the search parameter. Seperate the two cases so the
160+
// new feature is less likely to blow up the process if it has bugs--it's
161+
// less likely to be used anyway
153162
if k, from := KindOf(e.From); k.List() {
154163
data := track.win.Rdsel()
155164
VisitAll(from, func(p Named) {

0 commit comments

Comments
 (0)