Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Switch word editing progs to classic emacs behavior #29

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 2 additions & 6 deletions noise/lineImpl.nim
Original file line number Diff line number Diff line change
Expand Up @@ -362,12 +362,8 @@ when promptCompletion:
when promptWordEditing:
import unicode
proc findWord(self: var Line) =
if isAlphaNum(self.data[self.pos]):
# cursor under a word, move to left
while self.pos > 0 and isAlphaNum(self.data[self.pos - 1]):
dec self.pos
else:
# cursor under something else, move to next word
if not isAlphaNum(self.data[self.pos]):
# cursor not under word, move to next word
while self.pos < self.dataLen and not isAlphaNum(self.data[self.pos]):
inc self.pos

Expand Down