]> git.tue.mpg.de Git - paraslash.git/commit
string: Introduce compute_word_num().
authorAndre Noll <maan@systemlinux.org>
Sun, 28 Aug 2011 21:36:17 +0000 (23:36 +0200)
committerAndre Noll <maan@systemlinux.org>
Sun, 20 Nov 2011 14:08:41 +0000 (15:08 +0100)
commitb5e5c97342576b3a5f2b09feb68b38abea5dad22
treee0bd7bc898c3b1902345a8bff2c88dfa51f1702b
parent408458ad84180244b6a2ac327d13685bfb2b0867
string: Introduce compute_word_num().

The completion code needs to determine the word the curser is
currently on.  Libreadline only provides the start and end position
of the current word in the line buffer, but not the word number.

This patch adds compute_word_num() to string.c which uses the same
algorithm as create_argv() to determine the word boundaries.
string.c
string.h