3 source/preferences.c | 8 ++++++++
4 source/preferences.h | 1 +
6 3 files changed, 10 insertions(+), 1 deletion(-)
8 diff --quilt old/source/preferences.c new/source/preferences.c
9 --- old/source/preferences.c
10 +++ new/source/preferences.c
11 @@ -369,10 +369,11 @@ static struct prefData {
12 int defMenuColorLength;
13 char bgMenuColor[MAX_COLOR_LENGTH];
14 int bgMenuColorLength;
15 char transMenuColor[MAX_COLOR_LENGTH];
16 int transMenuColorLength;
17 + Boolean resizeWindow;
20 /* Temporary storage for preferences strings which are discarded after being
23 @@ -1217,10 +1218,12 @@ static PrefDescripRec PrefDescrip[] = {
24 PrefData.defMenuColor, (void *)sizeof(PrefData.defMenuColor), False},
25 {"backgroundWinMenuColor", "BackgroundWinMenuColor", PREF_STRING, "white",
26 PrefData.bgMenuColor, (void *)sizeof(PrefData.bgMenuColor), False},
27 {"transientWinMenuColor", "TransientWinMenuColor", PREF_STRING, "yellow",
28 PrefData.transMenuColor, (void *)sizeof(PrefData.transMenuColor), False},
29 + {"resizeWindow", "ResizeWindow", PREF_BOOLEAN, "True",
30 + &PrefData.resizeWindow, NULL, False},
33 static XrmOptionDescRec OpTable[] = {
34 {"-wrap", ".autoWrap", XrmoptionNoArg, (caddr_t)"Continuous"},
35 {"-nowrap", ".autoWrap", XrmoptionNoArg, (caddr_t)"None"},
36 @@ -2463,10 +2466,15 @@ int GetPrefZeroSizedMode(void)
37 void SetPrefZeroSizedMode(int mode)
39 setIntPref(&PrefData.zeroSizedMode, mode);
42 +Boolean GetPrefResizeWindow(void)
44 + return (Boolean) PrefData.resizeWindow;
48 ** If preferences don't get saved, ask the user on exit whether to save
50 void MarkPrefsChanged(void)
52 diff --quilt old/source/preferences.h new/source/preferences.h
53 --- old/source/preferences.h
54 +++ new/source/preferences.h
55 @@ -230,7 +230,8 @@ Boolean GetPrefShowCursorline(void);
56 Boolean GetPrefShowScrolltip(void);
57 int GetPrefHardlinkMode(void);
58 void SetPrefHardlinkMode(int mode);
59 int GetPrefZeroSizedMode(void);
60 void SetPrefZeroSizedMode(int mode);
61 +Boolean GetPrefResizeWindow(void);
63 #endif /* NEDIT_PREFERENCES_H_INCLUDED */
64 diff --quilt old/source/window.c new/source/window.c
65 --- old/source/window.c
66 +++ new/source/window.c
67 @@ -2748,11 +2748,11 @@ static int updateGutterWidth(WindowInfo*
73 - if (reqCols != maxCols) {
74 + if (reqCols != maxCols && GetPrefResizeWindow()) {
76 Dimension windowWidth;
79 newColsDiff = reqCols - maxCols;