# HG changeset patch # User Claus Gittinger # Date 1462627722 -7200 # Node ID 7da163a68f576eab7f700d0d3c320b53314e69ed # Parent 83f67e5544b874103f11ac98e515bb3b97caf8a7 #DOCUMENTATION by cg class: TextView comment/format in: #searchUsingSearchAction: #searchUsingSearchAction:ifAbsent: diff -r 83f67e5544b8 -r 7da163a68f57 TextView.st --- a/TextView.st Sat May 07 14:46:59 2016 +0200 +++ b/TextView.st Sat May 07 15:28:42 2016 +0200 @@ -4403,33 +4403,41 @@ ! searchUsingSearchAction:direction + "search using a searchaction which has been given by someone else. + Typically, this is the embedding browser, which has provided an action for + a language aware search (as opposed to a naive string search)" + self - searchUsingSearchAction:direction - ifAbsent:[ - self sensor compressKeyPressEventsWithKey:#FindNext. - self showNotFound - ] + searchUsingSearchAction:direction + ifAbsent:[ + self sensor compressKeyPressEventsWithKey:#FindNext. + self showNotFound + ] ! searchUsingSearchAction:direction ifAbsent:notFoundAction + "search using a searchaction which has been given by someone else. + Typically, this is the embedding browser, which has provided an action for + a language aware search (as opposed to a naive string search)" + |pos startLine startCol| pos := direction == #backward - ifTrue:[self startPositionForSearchBackward] - ifFalse:[self startPositionForSearchForward]. + ifTrue:[self startPositionForSearchBackward] + ifFalse:[self startPositionForSearchForward]. startLine := pos y. startCol := pos x. searchAction notNil ifTrue:[ - searchAction - value:direction - value:startLine - value:startCol - value:[:line :col | self selectFromLine:line toLine:line] - value:notFoundAction. - self hasSelection ifTrue: [ - self changeTypeOfSelectionTo: #searchAction. - ]. + searchAction + value:direction + value:startLine + value:startCol + value:[:line :col | self selectFromLine:line toLine:line] + value:notFoundAction. + self hasSelection ifTrue: [ + self changeTypeOfSelectionTo: #searchAction. + ]. ]. !