normal mode and vi-mode separation
This changes hides vi-mode behind generic input mode interface, which means that internals of ktexteditor no longer depends on vi-mode. There are no "if"s and only single one #ifdef. And yes there is a BUILDE_VIMODE cmake option now, which enables building ktexteditor without the vi-mode. == Why == Reason for doing this is the reduction of coupling and removal of those "if(viInputMode())" cases. == How it does == There is a new directory "inputmode", where the interfaces are. The KateAbstractInputModeFactory is ment to by initialized in KateGlobal. The view can then use it and ask it for KateAbstractInputMode instance, which it can then use in special places like "findNext" or "handleKeyPress", etc. The KateViInputModeFactory now hides KateViGlobal and KateViInputMode hides the KateViInputModeManager from the rest of the system. The interface of KateAbstractInputMode is currently in very bad shape, but that can be cleaned up easily. Lots of the places are oneliners...
parent
befa3944
Please register or sign in to comment