Well, a question like „Can you please comment on the question whether auto-run commands should be executed when switching view modes manually?” can obviously not be answered by throwing in a some button code.
However, the commands you have used for defining your button helped me to trace down the problem – this might (1) solve a potential misunderstanding and (2) indicate a potential bug/inconsistency.
------
In fact, my question must be rephrased to: “Which commands will trigger the auto-run commands when switching view modes manually?”
Here is the catch:
In my configuration I use some user-defined short cuts
Code: Select all
C+1=cm_SrcLong
C+2=cm_SrcCustomView1
to switch between view modes.
SrcCustomView1 refers to a view mode named “ViewModeWithAutoRunCommands” with the auto-run commands
However, neither cm_SrcCustomView1 nor cm_SrcLong do trigger these auto-run commands for CustomView1.
(I.e., cm_100Percent 80 is not executed when activating CustomView1 via Crtl+2, and cm_100Percent 50 is not activated when leaving CustomView1 to Long via Ctrl+1.)
If I reconfigure the short cuts to call user-defined commands that call cm_SrcViewModeList, like
Code: Select all
[em_ShowFileListDetails]
button=
cmd=cm_SrcViewModeList ViewModeWithAutoRunCommands
[em_ShowFileListLong]
button=
cmd=cm_SrcViewModeList 0
with
Code: Select all
C+1=em_ShowFileListLong
C+2=em_ShowFileListDetails
everything works well and the auto-run commands are triggered when activating or leaving the view mode.
------
Regarding (1) the potential misunderstanding: @tuska Perhaps we both focused too much on our respective methods/commands of switching view modes.
Regarding (2) the potential bug/inconsistency: I have not found anywhere (help file, history, command browser) that cm_SrcLong or SrcCustomView* do not trigger the auto-run commands -- but SrcViewModeList does. @ghisler Is this intentional? If so, a note in the help file would be helpful.