in mark_order(), add check for MARK_ISSET's not being set; also make one
more int -> bool conversion and cosmetic fix git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1974 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
Этот коммит содержится в:
родитель
28caf14863
Коммит
7cfea8bb8c
@ -154,6 +154,9 @@ CVS code -
|
|||||||
wholewords, not after all other parameters. (DLR)
|
wholewords, not after all other parameters. (DLR)
|
||||||
- Maintain current_y's value when moving up or down lines so
|
- Maintain current_y's value when moving up or down lines so
|
||||||
that smooth scrolling works correctly. (DLR)
|
that smooth scrolling works correctly. (DLR)
|
||||||
|
- utils.c:
|
||||||
|
mark_order()
|
||||||
|
- Add check for MARK_ISSET's not being set. (DLR)
|
||||||
- winio.c:
|
- winio.c:
|
||||||
unget_kbinput()
|
unget_kbinput()
|
||||||
- New function used as a wrapper for ungetch(). (DLR)
|
- New function used as a wrapper for ungetch(). (DLR)
|
||||||
|
@ -1719,7 +1719,7 @@ int write_marked(const char *name, int tmp, int append)
|
|||||||
int retval = -1;
|
int retval = -1;
|
||||||
filestruct *fileagebak = fileage;
|
filestruct *fileagebak = fileage;
|
||||||
filestruct *filebotbak = filebot;
|
filestruct *filebotbak = filebot;
|
||||||
int oldmod = ISSET(MODIFIED);
|
bool old_modified = ISSET(MODIFIED);
|
||||||
/* write_file() unsets the MODIFIED flag. */
|
/* write_file() unsets the MODIFIED flag. */
|
||||||
size_t topx;
|
size_t topx;
|
||||||
/* The column of the beginning of the mark. */
|
/* The column of the beginning of the mark. */
|
||||||
@ -1730,7 +1730,7 @@ int write_marked(const char *name, int tmp, int append)
|
|||||||
/* The location of the character we nulled. */
|
/* The location of the character we nulled. */
|
||||||
|
|
||||||
if (!ISSET(MARK_ISSET))
|
if (!ISSET(MARK_ISSET))
|
||||||
return -1;
|
return retval;
|
||||||
|
|
||||||
/* Set fileage as the top of the mark, and filebot as the bottom. */
|
/* Set fileage as the top of the mark, and filebot as the bottom. */
|
||||||
if (current->lineno > mark_beginbuf->lineno ||
|
if (current->lineno > mark_beginbuf->lineno ||
|
||||||
@ -1763,7 +1763,7 @@ int write_marked(const char *name, int tmp, int append)
|
|||||||
*origcharloc = origchar;
|
*origcharloc = origchar;
|
||||||
fileage = fileagebak;
|
fileage = fileagebak;
|
||||||
filebot = filebotbak;
|
filebot = filebotbak;
|
||||||
if (oldmod)
|
if (old_modified)
|
||||||
set_modified();
|
set_modified();
|
||||||
|
|
||||||
return retval;
|
return retval;
|
||||||
|
@ -441,6 +441,10 @@ void mark_order(const filestruct **top, size_t *top_x, const filestruct
|
|||||||
**bot, size_t *bot_x)
|
**bot, size_t *bot_x)
|
||||||
{
|
{
|
||||||
assert(top != NULL && top_x != NULL && bot != NULL && bot_x != NULL);
|
assert(top != NULL && top_x != NULL && bot != NULL && bot_x != NULL);
|
||||||
|
|
||||||
|
if (!ISSET(MARK_ISSET))
|
||||||
|
return;
|
||||||
|
|
||||||
if ((current->lineno == mark_beginbuf->lineno && current_x > mark_beginx)
|
if ((current->lineno == mark_beginbuf->lineno && current_x > mark_beginx)
|
||||||
|| current->lineno > mark_beginbuf->lineno) {
|
|| current->lineno > mark_beginbuf->lineno) {
|
||||||
*top = mark_beginbuf;
|
*top = mark_beginbuf;
|
||||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user