Search #4

Merged
merged 17 commits into from Oct 25, 2013

Conversation

Projects
None yet
2 participants
@georgebrock
Owner

georgebrock commented Oct 3, 2013

Adds /, ?, n and N.

Includes a refactor of arguments: Rather than operations knowing an argument type ("literal", "operation", "none") and using that to determine what to do with key presses, now there are argument objects (LiteralArgument, CommandLineArgument, NullArgument and Operation which has a compatible interface with arguments) and the operation just passed the key presses on for the argument to handle.

js/base.js
+ return true;
+ } else {
+ return false;
+ }

This comment has been minimized.

Show comment Hide comment
@mike-burns

mike-burns Oct 9, 2013

Owner

This pattern!

... that's all.

@mike-burns

mike-burns Oct 9, 2013

Owner

This pattern!

... that's all.

This comment has been minimized.

Show comment Hide comment
@georgebrock

georgebrock Oct 25, 2013

Owner

I've updated this:

  • moveCursor now accepts an object, so I can pass the result of findNext directly to it
  • findNext returns either {row: …, col: …, found: true} or {found: false}, never null
@georgebrock

georgebrock Oct 25, 2013

Owner

I've updated this:

  • moveCursor now accepts an object, so I can pass the result of findNext directly to it
  • findNext returns either {row: …, col: …, found: true} or {found: false}, never null
@mike-burns

This comment has been minimized.

Show comment Hide comment
@mike-burns

mike-burns Oct 9, 2013

Owner

Would a better name for NullArgument be NoArgument?

Owner

mike-burns commented Oct 9, 2013

Would a better name for NullArgument be NoArgument?

@georgebrock

This comment has been minimized.

Show comment Hide comment
@georgebrock

georgebrock Oct 25, 2013

Owner

Good call, I've renamed it to NoArgument.

Owner

georgebrock commented Oct 25, 2013

Good call, I've renamed it to NoArgument.

georgebrock added some commits Oct 25, 2013

More robust moveCursor method.
* Ignore null or undefined values.
* Accept an object with row and col properties.
Refactor moveToNext and moveToLast.
Rather than explicitly handling null results, findNext and findLast now
return a useful object whether they find what we wanted or not.
@georgebrock

This comment has been minimized.

Show comment Hide comment
@georgebrock

georgebrock Oct 25, 2013

Owner

Ready for another review, @mike-burns

Owner

georgebrock commented Oct 25, 2013

Ready for another review, @mike-burns

@mike-burns

This comment has been minimized.

Show comment Hide comment
@mike-burns

mike-burns Oct 25, 2013

Owner

Clever, but not too clever. I like it.

Owner

mike-burns commented on 4e26331 Oct 25, 2013

Clever, but not too clever. I like it.

@mike-burns

This comment has been minimized.

Show comment Hide comment
@mike-burns

mike-burns Oct 25, 2013

Owner

I like the refactoring. No further suggestions.

Owner

mike-burns commented Oct 25, 2013

I like the refactoring. No further suggestions.

@georgebrock

This comment has been minimized.

Show comment Hide comment
@georgebrock

georgebrock Oct 25, 2013

Owner

Thanks Mike, merging.

Owner

georgebrock commented Oct 25, 2013

Thanks Mike, merging.

@georgebrock georgebrock merged commit 9ac6c5a into master Oct 25, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment