Summary: | vim part fails to embed | ||
---|---|---|---|
Product: | [Unmaintained] kvim | Reporter: | Ben Burton <bab> |
Component: | Vim KPart | Assignee: | Mickael Marchand <kvim> |
Status: | RESOLVED INTENTIONAL | ||
Severity: | normal | CC: | lex.lists |
Priority: | NOR | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Platform: | Debian testing | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: |
Description
Ben Burton
2004-06-20 09:54:00 UTC
Further information on this bug: The reason kvim/gvim fails to embed is because the window title is not changed until too late. Specifically, the kvim/gvim process begins with a window title of "kvim", "Vim" or whatever. It then hands back control to the vimpart, and *then* processes the --cmd that changes the window title to the 10-letter random string. If you're lucky, kvim/gvim manages to change its title before VimWidget::embedVimWid() is called, and it embeds properly. (Well, it doesn't embed properly if you're using kdevelop but that's a different bug.) If you're not lucky, VimWidget::embedVimWid() gets called first and it ignores the kvim/gvim window because it hasn't changed its title yet. And you get the external GUI Vim process that I reported in this bug. For kvim (guitype == 1), this can be fixed by passing --caption to the kvim process, which will set the window title correctly right from the beginning. I've tested this and it works (in kwrite/etc, not in kdevelop), and I'll commit the fix to CVS shortly. For other guitypes, such as vim-gtk and vim-gnome, I can't see how to solve it. There don't seem to be any magic GTK arguments similar to KDE's --caption. But basically you need to make sure the window title is always fixed before VimWidget::embedVimWid() gets to it. Ben. Version: (using KDE 3.2.2) Installed from: Gentoo OS: Linux I've experienced the same problem with gvim as the remote server. I tried to patch the problem, the same way Ben Burton did for KVim, by hacking through the vim code. I added a cmd-line argument similar to "--caption", so that the titlestring can be properly set right from the start. Unfortunately, that didn't do it. On the other hand, by adding a sleep(1) after launch the vim process in the VimWidget constructor, I was able to make it work with gvim. I know it's a cheap hack, but it confirms that it's a syncing problem to be resolved. Going further than that, is beyond my capabilities and the time I have in hand. I wish you luck for resolving that problem. Alexis FYI, this is still the case with the GVIM/X11 method after installing the latest vimpart package (3.4.0 on Gentoo). What's more, the GVIM window that pops up is always empty (it fails to open the text file I clicked on) rendering vimpart basically useless until this is fixed... I've also encountered this same bug with vimpart 4:3.3.2-4 and both vim-gtk 1:6.3-071+1sarge1 and 1:6.4-007+1. Is there any resolution or work-around to this bug? Thanks, Shaun The kvim application is no longer maintained or supported by it's authors. See this page for some background: http://www.yzis.org/devel/history Closing all bugs won't fix. Some of the old kvim author's have started work on a new vi-like editor called yzis. Keeping in mind that it is pre-release software, you can check it out here: yzis.org |