Commit 6fe61499 authored by Chris Allegretta's avatar Chris Allegretta
Browse files

All the updates that I've been waiting all weekend to commit, no desc, tough

git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@668 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
No related merge requests found
Showing with 551 additions and 472 deletions
+551 -472
This diff is collapsed.
This diff is collapsed.
......@@ -34,7 +34,7 @@ extern int current_x, current_y, posible_max, totlines;
extern int placewewant;
extern int mark_beginx, samelinewrap;
extern int totsize, temp_opt;
extern int fill, flags,tabsize;
extern int fill, wrap_at, flags,tabsize;
extern int search_last_line;
extern int currslen;
......
......@@ -50,7 +50,11 @@ rcoption rcopts[NUM_RCOPTS] =
{"nofollow", FOLLOW_SYMLINKS},
{"mouse", USE_MOUSE},
{"pico", PICO_MODE},
#ifndef DISABLE_WRAPJUSTIFY
{"fill", 0},
#endif
{"speller", 0},
{"tempfile", TEMP_OPT},
{"view", VIEW_MODE},
......@@ -160,8 +164,16 @@ void parse_rcfile(FILE *rcstream, char *filename)
rcopts[i].name);
#endif
if (set == 1 || rcopts[i].flag == FOLLOW_SYMLINKS) {
if (!strcasecmp(rcopts[i].name, "fill") ||
!strcasecmp(rcopts[i].name, "speller")) {
if (
#ifndef DISABLE_WRAPJUSTIFY
!strcasecmp(rcopts[i].name, "fill") ||
#endif
#ifndef DISABLE_SPELLER
!strcasecmp(rcopts[i].name, "speller")
#else
0
#endif
) {
if (*ptr == '\n' || *ptr == '\0') {
rcfile_msg(&errors, _("Error in %s on line %d: option %s requires an argument"),
......@@ -171,6 +183,8 @@ void parse_rcfile(FILE *rcstream, char *filename)
option = ptr;
ptr = parse_next_word(ptr);
if (!strcasecmp(rcopts[i].name, "fill")) {
#ifndef DISABLE_WRAPJUSTIFY
if ((i = atoi(option)) < MIN_FILL_LENGTH) {
rcfile_msg(&errors,
_("Error in %s on line %d: requested fill size %d too small"),
......@@ -178,10 +192,13 @@ void parse_rcfile(FILE *rcstream, char *filename)
}
else
fill = i;
#endif
}
else {
#ifndef DISABLE_SPELLER
alt_speller = charalloc(strlen(option) + 1);
strcpy(alt_speller, option);
#endif
}
} else
SET(rcopts[i].flag);
......
......@@ -271,8 +271,11 @@ int nanogetstr(int allowtabs, char *buf, char *def, shortcut s[], int slen,
x_left = strlen(buf);
x = strlen(def) + x_left;
#ifndef DISABLE_MOUSE
currshortcut = s;
currslen = slen;
#endif
/* Get the input! */
if (strlen(def) > 0)
strcpy(inputbuf, def);
......@@ -1420,8 +1423,11 @@ int do_help(void)
curs_set(0);
blank_statusbar();
#ifndef DISABLE_MOUSE
currshortcut = help_list;
currslen = HELP_LIST_LEN;
#endif
kp = keypad_on(edit, 1);
kp2 = keypad_on(bottomwin, 1);
......
Markdown is supported
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