1 Subject: option for disabling automatic resizing of the window
5 source/preferences.c | 8 ++++++++
6 source/preferences.h | 1 +
8 3 files changed, 10 insertions(+), 1 deletion(-)
10 diff --quilt old/source/preferences.c new/source/preferences.c
11 --- old/source/preferences.c
12 +++ new/source/preferences.c
13 @@ -369,6 +369,7 @@ static struct prefData {
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
21 @@ -1215,6 +1216,8 @@ static PrefDescripRec PrefDescrip[] = {
22 PrefData.bgMenuColor, (void *)sizeof(PrefData.bgMenuColor), False},
23 {"transientWinMenuColor", "TransientWinMenuColor", PREF_STRING, "yellow",
24 PrefData.transMenuColor, (void *)sizeof(PrefData.transMenuColor), False},
25 + {"resizeWindow", "ResizeWindow", PREF_BOOLEAN, "True",
26 + &PrefData.resizeWindow, NULL, False},
29 static XrmOptionDescRec OpTable[] = {
30 @@ -2445,6 +2448,11 @@ int GetPrefZeroSizedMode(void)
31 return PrefData.zeroSizedMode;
34 +Boolean GetPrefResizeWindow(void)
36 + return (Boolean)PrefData.resizeWindow;
40 ** If preferences don't get saved, ask the user on exit whether to save
42 diff --quilt old/source/preferences.h new/source/preferences.h
43 --- old/source/preferences.h
44 +++ new/source/preferences.h
45 @@ -231,5 +231,6 @@ void SetPrefHardlinkMode(int mode);
46 int GetPrefHardlinkMode(void);
47 void SetPrefZeroSizedMode(int mode);
48 int GetPrefZeroSizedMode(void);
49 +Boolean GetPrefResizeWindow(void);
51 #endif /* NEDIT_PREFERENCES_H_INCLUDED */
52 diff --quilt old/source/window.c new/source/window.c
53 --- old/source/window.c
54 +++ new/source/window.c
55 @@ -2770,7 +2770,7 @@ static int updateGutterWidth(WindowInfo*
59 - if (reqCols != maxCols) {
60 + if (reqCols != maxCols && GetPrefResizeWindow()) {
62 Dimension windowWidth;