Tweaking some whitespace, using TRUE and FALSE instead of 1 and 0,
and mentioning the name of the terminal-tickling character (NBSP). Patch by David Lawrence Ramsey. git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4894 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
Этот коммит содержится в:
родитель
6081546161
Коммит
275bd28d3e
@ -1,3 +1,8 @@
|
||||
2014-05-16 David Lawrence Ramsey <pooka109@gmail.com>
|
||||
* src/color.c, src/cut.c, src/text.c: Tweak some whitespace.
|
||||
* src/global.c, src/move.c: Use TRUE and FALSE instead of 1 and 0.
|
||||
* src/winio.c (edit_draw): Mention the name of the tickling character.
|
||||
|
||||
2014-05-15 Mark Majeres <mark@engine12.com>
|
||||
* src/*, but mainly src/text.c (undo_cut, redo_cut, do_undo, do_redo):
|
||||
Go to the correct positions for undoing/redoing the cuts and pastes.
|
||||
|
@ -392,7 +392,6 @@ void reset_multis_before(filestruct *fileptr, int mindex)
|
||||
else
|
||||
break;
|
||||
}
|
||||
|
||||
edit_refresh_needed = TRUE;
|
||||
}
|
||||
|
||||
|
@ -44,7 +44,7 @@ void cutbuffer_reset(void)
|
||||
* current line. */
|
||||
void cut_line(void)
|
||||
{
|
||||
if(!openfile->mark_begin)
|
||||
if (!openfile->mark_begin)
|
||||
openfile->mark_begin = openfile->current;
|
||||
|
||||
if (openfile->current != openfile->filebot)
|
||||
|
@ -157,7 +157,7 @@ char *syntaxstr = NULL;
|
||||
|
||||
#endif
|
||||
|
||||
bool edit_refresh_needed = 0;
|
||||
bool edit_refresh_needed = FALSE;
|
||||
/* Did a command mangle enough of the buffer refresh that we
|
||||
* should repaint the screen? */
|
||||
|
||||
|
@ -33,7 +33,7 @@ void do_first_line(void)
|
||||
openfile->current_x = 0;
|
||||
openfile->placewewant = 0;
|
||||
|
||||
edit_refresh_needed = 1;
|
||||
edit_refresh_needed = TRUE;
|
||||
}
|
||||
|
||||
/* Move to the last line of the file. */
|
||||
@ -44,7 +44,7 @@ void do_last_line(void)
|
||||
openfile->placewewant = xplustabs();
|
||||
openfile->current_y = editwinrows - 1;
|
||||
|
||||
edit_refresh_needed = 1;
|
||||
edit_refresh_needed = TRUE;
|
||||
}
|
||||
|
||||
/* Move up one page. */
|
||||
|
@ -140,7 +140,7 @@ void do_delete(void)
|
||||
|
||||
if (ISSET(SOFTWRAP) && edit_refresh_needed == FALSE)
|
||||
if (strlenpt(openfile->current->data) / COLS != orig_lenpt / COLS)
|
||||
edit_refresh_needed = TRUE;
|
||||
edit_refresh_needed = TRUE;
|
||||
|
||||
set_modified();
|
||||
|
||||
@ -455,7 +455,6 @@ void do_undo(void)
|
||||
undidmsg = _("text delete");
|
||||
len = strlen(f->data) + strlen(u->strdata) + 1;
|
||||
data = charalloc(len);
|
||||
|
||||
strncpy(data, f->data, u->begin);
|
||||
strcpy(&data[u->begin], u->strdata);
|
||||
strcpy(&data[u->begin + strlen(u->strdata)], &f->data[u->begin]);
|
||||
@ -506,7 +505,7 @@ void do_undo(void)
|
||||
if (f->next) {
|
||||
filestruct *foo = f->next;
|
||||
f->data = (char *) nrealloc(f->data, strlen(f->data) + strlen(f->next->data) + 1);
|
||||
strcat(f->data, f->next->data);
|
||||
strcat(f->data, f->next->data);
|
||||
unlink_node(foo);
|
||||
delete_node(foo);
|
||||
}
|
||||
@ -946,7 +945,7 @@ void add_undo(undo_type current_action)
|
||||
|
||||
filestruct *fs_buff = cutbuffer;
|
||||
if (fs_buff->lineno == cutbottom->lineno)
|
||||
u->begin = fs->current_x + get_totsize(fs_buff,cutbottom);
|
||||
u->begin = fs->current_x + get_totsize(fs_buff, cutbottom);
|
||||
else {
|
||||
/* Advance fs_buff to the last line in the cutbuffer. */
|
||||
while (fs_buff->lineno != cutbottom->lineno && fs_buff->next != NULL)
|
||||
|
@ -2497,7 +2497,8 @@ void edit_draw(filestruct *fileptr, const char *converted, int
|
||||
mvwaddstr(edit, line, 0, converted);
|
||||
#ifdef ENABLE_UTF8
|
||||
if (using_utf8())
|
||||
/* Tickle the terminal into displaying two-column characters properly. */
|
||||
/* Tickle the terminal into displaying two-column characters
|
||||
* properly, using Unicode 00A0 (No-Break Space). */
|
||||
mvwaddstr(edit, line, COLS - 1, "\xC2\xA0\x00");
|
||||
#endif
|
||||
|
||||
|
Загрузка…
Ссылка в новой задаче
Block a user