Commit 17cf833b authored by Benno Schulenberg's avatar Benno Schulenberg
Browse files

tweaks: normalize some whitespace

No related merge requests found
Showing with 39 additions and 41 deletions
+39 -41
...@@ -311,16 +311,14 @@ char *do_browser(char *path) ...@@ -311,16 +311,14 @@ char *do_browser(char *path)
#endif #endif
if (stat(filelist[selected], &st) == -1) { if (stat(filelist[selected], &st) == -1) {
/* We can't open this file for some reason. /* We can't open this file for some reason. Complain. */
* Complain. */
statusline(ALERT, _("Error reading %s: %s"), statusline(ALERT, _("Error reading %s: %s"),
filelist[selected], strerror(errno)); filelist[selected], strerror(errno));
continue; continue;
} }
if (!S_ISDIR(st.st_mode)) { if (!S_ISDIR(st.st_mode)) {
/* We've successfully opened a file, we're done, so /* We've successfully opened a file, so we're done. */
* get out. */
retval = mallocstrcpy(NULL, filelist[selected]); retval = mallocstrcpy(NULL, filelist[selected]);
break; break;
} }
......
...@@ -2987,13 +2987,15 @@ int check_dotnano(void) ...@@ -2987,13 +2987,15 @@ int check_dotnano(void)
if (stat(nanodir, &dirstat) == -1) { if (stat(nanodir, &dirstat) == -1) {
if (mkdir(nanodir, S_IRWXU | S_IRWXG | S_IRWXO) == -1) { if (mkdir(nanodir, S_IRWXU | S_IRWXG | S_IRWXO) == -1) {
history_error(N_("Unable to create directory %s: %s\n" history_error(N_("Unable to create directory %s: %s\n"
"It is required for saving/loading search history or cursor positions.\n"), "It is required for saving/loading "
"search history or cursor positions.\n"),
nanodir, strerror(errno)); nanodir, strerror(errno));
ret = 0; ret = 0;
} }
} else if (!S_ISDIR(dirstat.st_mode)) { } else if (!S_ISDIR(dirstat.st_mode)) {
history_error(N_("Path %s is not a directory and needs to be.\n" history_error(N_("Path %s is not a directory and needs to be.\n"
"Nano will be unable to load or save search history or cursor positions.\n"), "Nano will be unable to load or save "
"search history or cursor positions.\n"),
nanodir); nanodir);
ret = 0; ret = 0;
} }
......
...@@ -1111,9 +1111,8 @@ void do_exit(void) ...@@ -1111,9 +1111,8 @@ void do_exit(void)
if (ISSET(TEMP_FILE)) if (ISSET(TEMP_FILE))
no_current_file_name_warning(); no_current_file_name_warning();
i = do_yesno_prompt(FALSE, i = do_yesno_prompt(FALSE, _("Save modified buffer? "
_("Save modified buffer? (Answering \"No\" will" "(Answering \"No\" will DISCARD changes.) "));
" DISCARD changes.) "));
} }
#ifdef DEBUG #ifdef DEBUG
......
...@@ -3049,15 +3049,14 @@ const char *do_alt_speller(char *tempfile_name) ...@@ -3049,15 +3049,14 @@ const char *do_alt_speller(char *tempfile_name)
} }
#endif #endif
/* Replace the text of the current buffer with the spell-checked /* Replace the text of the current buffer with the spell-checked text. */
* text. */
replace_buffer(tempfile_name); replace_buffer(tempfile_name);
#ifndef NANO_TINY #ifndef NANO_TINY
if (old_mark_set) { if (old_mark_set) {
filestruct *top_save = openfile->fileage; filestruct *top_save = openfile->fileage;
/* Adjust the end point of the marked region for any change in /* Adjust the end point of the marked region for any change in
length of the region's last line. */ * length of the region's last line. */
if (right_side_up) if (right_side_up)
current_x_save = strlen(openfile->filebot->data); current_x_save = strlen(openfile->filebot->data);
else else
......
...@@ -3059,8 +3059,8 @@ void total_refresh(void) ...@@ -3059,8 +3059,8 @@ void total_refresh(void)
void display_main_list(void) void display_main_list(void)
{ {
#ifndef DISABLE_COLOR #ifndef DISABLE_COLOR
if (openfile->syntax if (openfile->syntax &&
&& (openfile->syntax->formatter || openfile->syntax->linter)) (openfile->syntax->formatter || openfile->syntax->linter))
set_lint_or_format_shortcuts(); set_lint_or_format_shortcuts();
else else
set_spell_shortcuts(); set_spell_shortcuts();
......
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