Skip to content
Commit ce4a5776 authored by Michal Humpula's avatar Michal Humpula 🔥
Browse files

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
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment