disable OM2.3.1 by default, enable with make bertw OM231=1
[nedit-bw.git] / detectlangmode.patch
blob3f12bb8d4908d928765ffa87a19d47278de81c22
1 Subject: detect language mode while typing
3 ---
5 source/window.c | 6 ++++++
6 1 file changed, 6 insertions(+)
8 diff --quilt old/source/window.c new/source/window.c
9 --- old/source/window.c
10 +++ new/source/window.c
11 @@ -2478,10 +2478,16 @@ static void modifiedCB(int pos, int nIns
12 UpdateStatsLine(window);
14 /* Check if external changes have been made to file and warn user */
15 CheckForChangesToFile(window);
17 + /* Determine language mode for "Untitled" files while typing */
18 + if (window->languageMode == PLAIN_LANGUAGE_MODE
19 + && window->filenameSet == False) {
20 + DetermineLanguageMode(window, True);
21 + }
23 /* thats a hight frequency hook, should never force a preemptable
24 context */
25 MacroApplyHook(window, "modified_hook", 0, NULL, NULL);