#414 'Observer pattern' behavior not maintained


If you are running vim a standalone command prompt window and another application modifies the file being edited, vim is notified (probably through some form of the 'Observer Pattern') and displays a message asking whether the new version should be loaded. For some reason, running vim in a command prompt window within Console2 causes this NOT to happen.

Nice piece of software, BTW, regardless of this issue.


  • Marko Bozikovic

    Marko Bozikovic - 2012-05-17

    Does the message pop-up in a new window? If yes, then you should open console settings and uncheck 'start windows console hidden'

  • Gerald

    Gerald - 2012-05-17

    It appears to be unchecked- already- I don't believe I touched that option since I installed (however I don't see any console window appearing when I launch-- something DOES come up when i select View/Console Window). I tried CHECKING the option, just for a sanity check-- no difference.

    vim runs within the command prompt window that launches it (as opposed to gvim which creates and executes in a new window entirely)-- I would imagine that would have something to do with it. As such, it may just be a 'feature' of the embedding, as opposed to any actual bug on the part of Console.

    If you want to reproduce and see the issue:

    1. Open up a command prompt window and edit a file using vim. Add a couple of lines to the file and write it (stay in vim).
    2. Open a second command prompt window and do the same (or somehow otherwise make a change to the file you edited in the first window; if you vim it, you'll get a message about the swap file; continue with (E)dit); write it out again
    3. Go bsck to the first vim window-- there'll be a message on the status line that the file has changed and do you wish to (L)oad the new version.

    Now do the same, but this time use two windows embedded within Console-- you don't get that last message about reloading. BTW, if you make the change in a Console/vim window, a standalone command prompt vim will display the message, but not vice versa. This just suggests to me that there's a system-level notification that's passed to vim that propagates through the command prompt, but not through Console.

    Again, this might not be an issue that can be rectified-- when you run vim from within the command prompt window, the icon changes asnd a new vim.exe process is created (although the original cmd.exe is still present).

    Finally, though I'm not sure if this is merely a red herring (since I've been playing with this a bit): I just opened Task Manager and see there are about 8 cmd.exe's and a similar number of vim.exe's -- apparently orphan processes. I killed them, but was unable to reproduce the creation of further orphans-- opening tabs, and running vim, then killing Console (through the upper right 'X' on the title bar) killed the processes just fine.


Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.

No, thanks