nano-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Nano-devel] adding a word-completion feature to nano


From: Sumedh Pendurkar
Subject: Re: [Nano-devel] adding a word-completion feature to nano
Date: Tue, 18 Oct 2016 02:09:25 +0530

Hi,

On 17 October 2016 at 23:42, Benno Schulenberg <address@hidden> wrote:

I don't like it that auto_complete_void() reads the input
stream.  Better use a global variable to store the state.
Somewhere in do_input(), after 'if (have_shortcut) {', do:

    if (s->scfunc != complete_a_word)
        new_completion = TRUE;

(Yes, rename auto_complete_void() to complete_a_word().)
So every ^] keystroke enters /and/ exits from this function

 
I am not completely clear about this part.
Please correct me if I am wrong about this:
1)When user hits "^]" every time complete_a_word() should be called.(instead of taking input in a loop as I have done in the previous patch)
2) I should be using 2 global variables(or something similar of that sort) 1. To store if user has hit consecutive "^]" (so it starts from the last position else start from fileage) 2. last position where the word is found.

Thanks & Regards,
Sumedh Pendurkar

reply via email to

[Prev in Thread] Current Thread [Next in Thread]