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

Completion widget #10

Open
Drup opened this issue Jul 20, 2014 · 3 comments
Open

Completion widget #10

Drup opened this issue Jul 20, 2014 · 3 comments

Comments

@Drup
Copy link
Member

Drup commented Jul 20, 2014

I'm trying to build a widget which is a delicate mix between LTerm_edit and LTerm_read_line, and I can't manage to make it work. My final goal is to reimplement ocp-browser with lambda-term.

So, what I want is a single line editor widget with autocompletion.

I managed to implement it without autocompletion, here, it works as expected.

To add autocompletion, I figured I could use LTerm_read_line. I can't simply inherit from it and LTerm_edit at the same time (they are incompatible in numerous ways), so I tried to build a widget inhering from LTerm_read_line and using the code from LTerm_edit. The frankenstein-y result is here. It doesn't work, and I have no idea why, and I'm starting to be a bit desperate about it. :(

@Drup
Copy link
Member Author

Drup commented Jul 20, 2014

And I found the issue, and it was stupid: I forgot to put a method can_focus = true. I feel slightly dumb now.

We can now move on to my second question: Would it be possible to modify the edit widget in order not to have to copy the code ?

@avysk
Copy link
Contributor

avysk commented Jul 20, 2014

Hello,

modifying edit widget should be entirely possible (though I didn't have a look at your code yet). Would you like to create a pull request or would you like me to have a look at your code and do the changes myself? Both ways are fine.

P.S. I'm having my vacations and living now in the place with very limited connectivity so don't be surprised if it takes a couple of days from me to reply.

@Drup
Copy link
Member Author

Drup commented Jul 20, 2014

I'm not completely sure how you would do it, in fact, it seems to introduce too much parametricity to be acceptable.

qheath pushed a commit to qheath/lambda-term that referenced this issue Mar 21, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants