PaulSquires / WinFBE

FreeBASIC Editor and Visual Designer for Windows
https://www.planetsquires.com
GNU General Public License v3.0
156 stars 39 forks source link

bug: code window function/sub drop-down follows lower split, but not upper #28

Closed ghost closed 3 years ago

ghost commented 3 years ago

RECREATE: Create code with multiple functions, subs. Split code window. Click lower pane to put focus there.. Observe that Function/Sub drop-down list tracks which method has cursor. One: Click in upper pane, choose any other method than what you were visiting in lower pane. Two: Change the selected method while the upper pane has focus. ERROR: One: Note that drop-down list of methods is not set to the method visited in the upper pane; it is still pointing to the method visited in the lower pane. Two: Note that even though the focus is in the upper pane, it is the lower pane that is updated when the drop-down list selection is changed by the user. EXPECTED: One: Drop-down list of methods points to the currently-visited method in whichever pane has the focus. Two: Changing the drop-down list selection will change the pane that has focus. WORKAROUND: none VERSION: 2.1.8

PaulSquires commented 3 years ago

SCEN_KILLFOCUS in WM_COMMAND was resetting the hWndActiveScintilla window to zero when focus was lost. Therefore, when combobox selected the tracking of the active editing Scintilla window would be lost (it would be set to zero). When a function was selected from the combobox then WinFBE would default to showing the code in the primary Scintilla window which could be a different pane than what the user intended.