Removing stray spaces before tabs.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4652 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
This commit is contained in:
@@ -10,6 +10,7 @@
|
|||||||
remove an obsolete comment, and remove some superfluous #ifndefs.
|
remove an obsolete comment, and remove some superfluous #ifndefs.
|
||||||
* src/global.c (shortcut_init) - Put ^B and ^F in the same order as
|
* src/global.c (shortcut_init) - Put ^B and ^F in the same order as
|
||||||
all other command keys: first the backward then the forward motion.
|
all other command keys: first the backward then the forward motion.
|
||||||
|
* src/{nano.h,*.c} - Remove stray spaces before tabs.
|
||||||
|
|
||||||
2014-03-16 Benno Schulenberg <bensberg@justemail.net>
|
2014-03-16 Benno Schulenberg <bensberg@justemail.net>
|
||||||
* src/nano.h - Display more help items when the terminal is wider.
|
* src/nano.h - Display more help items when the terminal is wider.
|
||||||
|
|||||||
@@ -1070,7 +1070,7 @@ char *striponedir(const char *path)
|
|||||||
tmp = strrchr(retval, '/');
|
tmp = strrchr(retval, '/');
|
||||||
|
|
||||||
if (tmp != NULL)
|
if (tmp != NULL)
|
||||||
null_at(&retval, tmp - retval);
|
null_at(&retval, tmp - retval);
|
||||||
|
|
||||||
return retval;
|
return retval;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -937,7 +937,7 @@ int open_file(const char *filename, bool newfie, FILE **f)
|
|||||||
statusbar(_("Error reading %s: %s"), filename,
|
statusbar(_("Error reading %s: %s"), filename,
|
||||||
strerror(errno));
|
strerror(errno));
|
||||||
beep();
|
beep();
|
||||||
return -1;
|
return -1;
|
||||||
} else {
|
} else {
|
||||||
/* The file is A-OK. Open it. */
|
/* The file is A-OK. Open it. */
|
||||||
*f = fdopen(fd, "rb");
|
*f = fdopen(fd, "rb");
|
||||||
|
|||||||
@@ -604,7 +604,7 @@ void shortcut_init(bool unjustify)
|
|||||||
#ifdef ENABLE_MULTIBUFFER
|
#ifdef ENABLE_MULTIBUFFER
|
||||||
N_("Close the current file buffer / Exit from nano")
|
N_("Close the current file buffer / Exit from nano")
|
||||||
#else
|
#else
|
||||||
N_("Exit from nano")
|
N_("Exit from nano")
|
||||||
#endif
|
#endif
|
||||||
;
|
;
|
||||||
const char *nano_writeout_msg =
|
const char *nano_writeout_msg =
|
||||||
@@ -1177,7 +1177,7 @@ void shortcut_init(bool unjustify)
|
|||||||
add_to_sclist(MMAIN, "M-{", do_unindent, 0, TRUE);
|
add_to_sclist(MMAIN, "M-{", do_unindent, 0, TRUE);
|
||||||
if (ISSET(UNDOABLE)) {
|
if (ISSET(UNDOABLE)) {
|
||||||
add_to_sclist(MMAIN, "M-U", do_undo, 0, TRUE);
|
add_to_sclist(MMAIN, "M-U", do_undo, 0, TRUE);
|
||||||
add_to_sclist(MMAIN, "M-E", do_redo, 0, TRUE);
|
add_to_sclist(MMAIN, "M-E", do_redo, 0, TRUE);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
add_to_sclist(MALL, "^F", do_right, 0, TRUE);
|
add_to_sclist(MALL, "^F", do_right, 0, TRUE);
|
||||||
|
|||||||
12
src/nano.c
12
src/nano.c
@@ -1685,7 +1685,7 @@ int do_input(bool *meta_key, bool *func_key, bool *s_or_t, bool
|
|||||||
#endif
|
#endif
|
||||||
if (edit_refresh_needed) {
|
if (edit_refresh_needed) {
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
fprintf(stderr, "running edit_refresh() as edit_refresh_needed is true\n");
|
fprintf(stderr, "running edit_refresh() as edit_refresh_needed is true\n");
|
||||||
#endif
|
#endif
|
||||||
edit_refresh();
|
edit_refresh();
|
||||||
edit_refresh_needed = FALSE;
|
edit_refresh_needed = FALSE;
|
||||||
@@ -1741,7 +1741,7 @@ int do_mouse(void)
|
|||||||
fprintf(stderr, "mouse_y = %d, current_y = %d\n", mouse_y, openfile->current_y);
|
fprintf(stderr, "mouse_y = %d, current_y = %d\n", mouse_y, openfile->current_y);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (ISSET(SOFTWRAP)) {
|
if (ISSET(SOFTWRAP)) {
|
||||||
int i = 0;
|
int i = 0;
|
||||||
for (openfile->current = openfile->edittop;
|
for (openfile->current = openfile->edittop;
|
||||||
openfile->current->next && i < mouse_y;
|
openfile->current->next && i < mouse_y;
|
||||||
@@ -1825,7 +1825,7 @@ void precalc_multicolorinfo(void)
|
|||||||
message before starting this later if it takes
|
message before starting this later if it takes
|
||||||
too long to do this routine. For now silently
|
too long to do this routine. For now silently
|
||||||
abort if they hit a key */
|
abort if they hit a key */
|
||||||
nodelay(edit, FALSE);
|
nodelay(edit, FALSE);
|
||||||
|
|
||||||
for (; tmpcolor != NULL; tmpcolor = tmpcolor->next) {
|
for (; tmpcolor != NULL; tmpcolor = tmpcolor->next) {
|
||||||
|
|
||||||
@@ -1851,7 +1851,7 @@ void precalc_multicolorinfo(void)
|
|||||||
if ((cur_check = time(NULL)) - last_check > 1) {
|
if ((cur_check = time(NULL)) - last_check > 1) {
|
||||||
last_check = cur_check;
|
last_check = cur_check;
|
||||||
if (wgetch(edit) != ERR)
|
if (wgetch(edit) != ERR)
|
||||||
goto precalc_cleanup;
|
goto precalc_cleanup;
|
||||||
}
|
}
|
||||||
|
|
||||||
while ((nostart = regexec(tmpcolor->start, &fileptr->data[startx], 1, &startmatch, 0)) == 0) {
|
while ((nostart = regexec(tmpcolor->start, &fileptr->data[startx], 1, &startmatch, 0)) == 0) {
|
||||||
@@ -1882,7 +1882,7 @@ void precalc_multicolorinfo(void)
|
|||||||
if ((cur_check = time(NULL)) - last_check > 1) {
|
if ((cur_check = time(NULL)) - last_check > 1) {
|
||||||
last_check = cur_check;
|
last_check = cur_check;
|
||||||
if (wgetch(edit) != ERR)
|
if (wgetch(edit) != ERR)
|
||||||
goto precalc_cleanup;
|
goto precalc_cleanup;
|
||||||
}
|
}
|
||||||
if (regexec(tmpcolor->end, endptr->data, 1, &endmatch, 0) == 0)
|
if (regexec(tmpcolor->end, endptr->data, 1, &endmatch, 0) == 0)
|
||||||
break;
|
break;
|
||||||
@@ -1890,7 +1890,7 @@ void precalc_multicolorinfo(void)
|
|||||||
|
|
||||||
if (endptr == NULL) {
|
if (endptr == NULL) {
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
fprintf(stderr, "no end found, breaking out\n");
|
fprintf(stderr, "no end found, breaking out\n");
|
||||||
#endif
|
#endif
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|||||||
10
src/nano.h
10
src/nano.h
@@ -262,15 +262,15 @@ typedef struct lintstruct {
|
|||||||
} lintstruct;
|
} lintstruct;
|
||||||
|
|
||||||
|
|
||||||
#define CNONE (1<<1)
|
#define CNONE (1<<1)
|
||||||
/* Yay, regex doesn't apply to this line at all! */
|
/* Yay, regex doesn't apply to this line at all! */
|
||||||
#define CBEGINBEFORE (1<<2)
|
#define CBEGINBEFORE (1<<2)
|
||||||
/* regex starts on an earlier line, ends on this one */
|
/* regex starts on an earlier line, ends on this one */
|
||||||
#define CENDAFTER (1<<3)
|
#define CENDAFTER (1<<3)
|
||||||
/* regex sraers on this line and ends on a later one */
|
/* regex sraers on this line and ends on a later one */
|
||||||
#define CWHOLELINE (1<<4)
|
#define CWHOLELINE (1<<4)
|
||||||
/* whole line engulfed by the regex start < me, end > me */
|
/* whole line engulfed by the regex start < me, end > me */
|
||||||
#define CSTARTENDHERE (1<<5)
|
#define CSTARTENDHERE (1<<5)
|
||||||
/* regex starts and ends within this line */
|
/* regex starts and ends within this line */
|
||||||
#define CWTF (1<<6)
|
#define CWTF (1<<6)
|
||||||
/* Something else */
|
/* Something else */
|
||||||
|
|||||||
@@ -186,7 +186,7 @@ int do_statusbar_input(bool *meta_key, bool *func_key, bool *have_shortcut,
|
|||||||
else if (s->scfunc == do_verbatim_input) {
|
else if (s->scfunc == do_verbatim_input) {
|
||||||
/* If we're using restricted mode, the filename
|
/* If we're using restricted mode, the filename
|
||||||
* isn't blank, and we're at the "Write File"
|
* isn't blank, and we're at the "Write File"
|
||||||
* prompt, disable verbatim input. */
|
* prompt, disable verbatim input. */
|
||||||
if (!ISSET(RESTRICTED) ||
|
if (!ISSET(RESTRICTED) ||
|
||||||
openfile->filename[0] == '\0' ||
|
openfile->filename[0] == '\0' ||
|
||||||
currmenu != MWRITEFILE) {
|
currmenu != MWRITEFILE) {
|
||||||
|
|||||||
@@ -1098,7 +1098,7 @@ void parse_rcfile(FILE *rcstream
|
|||||||
parse_syntax(ptr);
|
parse_syntax(ptr);
|
||||||
}
|
}
|
||||||
else if (strcasecmp(keyword, "magic") == 0) {
|
else if (strcasecmp(keyword, "magic") == 0) {
|
||||||
parse_magictype(ptr);
|
parse_magictype(ptr);
|
||||||
} else if (strcasecmp(keyword, "header") == 0)
|
} else if (strcasecmp(keyword, "header") == 0)
|
||||||
parse_headers(ptr);
|
parse_headers(ptr);
|
||||||
else if (strcasecmp(keyword, "color") == 0)
|
else if (strcasecmp(keyword, "color") == 0)
|
||||||
|
|||||||
@@ -224,7 +224,7 @@ int search_init(bool replacing, bool use_answer)
|
|||||||
for (s = sclist; s != NULL; s = s->next)
|
for (s = sclist; s != NULL; s = s->next)
|
||||||
if ((s->menu & currmenu) && i == s->seq) {
|
if ((s->menu & currmenu) && i == s->seq) {
|
||||||
func = s->scfunc;
|
func = s->scfunc;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (i == -2 || i == 0 ) {
|
if (i == -2 || i == 0 ) {
|
||||||
|
|||||||
@@ -418,7 +418,7 @@ void redo_cut(undo *u) {
|
|||||||
t = t->next;
|
t = t->next;
|
||||||
}
|
}
|
||||||
openfile->mark_begin = t;
|
openfile->mark_begin = t;
|
||||||
openfile->mark_begin_x = 0;
|
openfile->mark_begin_x = 0;
|
||||||
openfile->mark_set = TRUE;
|
openfile->mark_set = TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -3073,7 +3073,7 @@ void do_linter(void)
|
|||||||
/* Get the system pipe buffer size. */
|
/* Get the system pipe buffer size. */
|
||||||
if ((pipe_buff_size = fpathconf(lint_fd[0], _PC_PIPE_BUF)) < 1) {
|
if ((pipe_buff_size = fpathconf(lint_fd[0], _PC_PIPE_BUF)) < 1) {
|
||||||
close(lint_fd[0]);
|
close(lint_fd[0]);
|
||||||
statusbar(_("Could not get size of pipe buffer"));
|
statusbar(_("Could not get size of pipe buffer"));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -2507,7 +2507,7 @@ void edit_draw(filestruct *fileptr, const char *converted, int
|
|||||||
/* Set up multi-line color data for this line if it's not yet calculated */
|
/* Set up multi-line color data for this line if it's not yet calculated */
|
||||||
if (fileptr->multidata == NULL && openfile->syntax
|
if (fileptr->multidata == NULL && openfile->syntax
|
||||||
&& openfile->syntax->nmultis > 0) {
|
&& openfile->syntax->nmultis > 0) {
|
||||||
int i;
|
int i;
|
||||||
fileptr->multidata = (short *) nmalloc(openfile->syntax->nmultis * sizeof(short));
|
fileptr->multidata = (short *) nmalloc(openfile->syntax->nmultis * sizeof(short));
|
||||||
for (i = 0; i < openfile->syntax->nmultis; i++)
|
for (i = 0; i < openfile->syntax->nmultis; i++)
|
||||||
fileptr->multidata[i] = -1; /* Assue this applies until we know otherwise */
|
fileptr->multidata[i] = -1; /* Assue this applies until we know otherwise */
|
||||||
|
|||||||
Reference in New Issue
Block a user