Open File A.
Open File B.
Switch File B to other view (View -> Move/Clone Current Document -> Move Document to Other View).
Open python console. Try the following commands:
notepad.menuCommand(MENUCOMMAND.VIEW_SWITCHTO_OTHER_VIEW) # -> nothing happens
notepad.menuCommand(44072) # -> with integer from nativeLang.xml, nothing happens
notepad.runMenuCommand('View', 'Focus on Another View') # -> nothing happens
But ENUMS like MENUCOMMAND.VIEW_GOTO_ANOTHER_VIEW and other parameter for runMenuCommand are working.
I don't have the skills of a software engineer, so I can't tell you more about what is going on there. I'am new to python, too. But perhaps the problem is connected to Bug 3520421 "getCurrentDocIndex doesn't respect the view parameter"?
System: Windows 7 Professional
Notepad++: 6.0
PythonScript: 0.9.2.0
Thanks for your Plugin! It's a great, easy tool and it's enhancing the power of Notepad++ so much. And with such a good documentation even I can customize existing scripts or create littel own ones.
I haven't tried any of the ways to switch view described here, but I think the way I do it works:
other_view = abs(1 - notepad.getCurrentView())
notepad.activateIndex(other_view, notepad.getCurrentDocIndex(other_view))
This means that this bug could still be valid, I just wanted to say that there seems to be a workaround.
This appears to be a Notepad++ "bug" (although you could argue that it's not being used as intended). The following:
notepad.menuCommand(MENUCOMMAND.VIEW_SWITCHTO_OTHER_VIEW)
works correctly when run in a script, but not when run from the console. When the focus is on the console, then clicking the menu item doesn't do anything either, only when the focus is on one of the edit views. I'd raise this with that project (I'll try and have a look too when I'm done with PythonScript 1.0 fixes/changes).