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

vim8 event loop and channels #12

Merged
merged 5 commits into from
Sep 20, 2017
Merged

vim8 event loop and channels #12

merged 5 commits into from
Sep 20, 2017

Conversation

equalsraf
Copy link
Owner

Testing on top of #11, terminal seems to be working.

I did not get a chance to look at FEAT_TIMERS, we are definitely no handling that. And the mch wait_for_char seems to have changed a lot, so I'm not sure how to handle it.

BlackIkeEagle and others added 5 commits September 12, 2017 19:08
Signed-off-by: BlackEagle <ike.devolder@gmail.com>
Signed-off-by: BlackEagle <ike.devolder@gmail.com>
Signed-off-by: BlackEagle <ike.devolder@gmail.com>
Added functions to create and remove a QSocketNotifier, similar to
the gtk API.
@equalsraf equalsraf mentioned this pull request Sep 13, 2017
@BlackIkeEagle BlackIkeEagle merged commit 47d0c4b into master Sep 20, 2017
@BlackIkeEagle
Copy link
Collaborator

Hmm jumped it to quick, seems like in my case its not working, I have zsh as my shell and am still having issues with :terminal in the gui

@equalsraf
Copy link
Owner Author

What happened exactly? does it work with other shells?

In my case nothing got displayed in the terminal window.

@BlackIkeEagle
Copy link
Collaborator

I just get a black half screen where the terminal should be, but nothing else, and can't properly close after issueing :terminal

I just compiled it from master then ran src/vim -u NONE -U NONE -g

@equalsraf
Copy link
Owner Author

equalsraf commented Sep 21, 2017

sigh, it seems i forgot to add some code in that pr, quick hack

diff --git a/src/qt/vimwrapper.cpp b/src/qt/vimwrapper.cpp
index 7ee8d1dc9..a5024eb8b 100644
--- a/src/qt/vimwrapper.cpp
+++ b/src/qt/vimwrapper.cpp
@@ -399,6 +399,10 @@ bool VimWrapper::processEvents(long wtime, bool inputOnly)
                }
        }
 
+#ifdef MESSAGE_QUEUE
+       parse_queued_messages();
+#endif
+
        int ret = FAIL;
        if ( wtime == -1 ) {
                QApplication::processEvents( QEventLoop::WaitForMoreEvents);
@@ -413,6 +417,10 @@ bool VimWrapper::processEvents(long wtime, bool inputOnly)
                do {
 
                        QApplication::processEvents( QEventLoop::WaitForMoreEvents);
+
+#ifdef MESSAGE_QUEUE
+                       parse_queued_messages();
+#endif
                        if ( hasPendingEvents() || !vim_is_input_buf_empty() ) {
                                goto out;
                        }

edit: i have not checked any deeper for correctness, so its possible im doing this in the wrong place

@equalsraf equalsraf mentioned this pull request Sep 25, 2017
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

Successfully merging this pull request may close these issues.

2 participants