more int -> bool conversion and cosmetic fix
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1974
35c25a1d-7b9e-4130-9fde-
d3aeb78583b8
wholewords, not after all other parameters. (DLR)
- Maintain current_y's value when moving up or down lines so
that smooth scrolling works correctly. (DLR)
+- utils.c:
+ mark_order()
+ - Add check for MARK_ISSET's not being set. (DLR)
- winio.c:
unget_kbinput()
- New function used as a wrapper for ungetch(). (DLR)
int retval = -1;
filestruct *fileagebak = fileage;
filestruct *filebotbak = filebot;
- int oldmod = ISSET(MODIFIED);
+ bool old_modified = ISSET(MODIFIED);
/* write_file() unsets the MODIFIED flag. */
size_t topx;
/* The column of the beginning of the mark. */
/* The location of the character we nulled. */
if (!ISSET(MARK_ISSET))
- return -1;
+ return retval;
/* Set fileage as the top of the mark, and filebot as the bottom. */
if (current->lineno > mark_beginbuf->lineno ||
*origcharloc = origchar;
fileage = fileagebak;
filebot = filebotbak;
- if (oldmod)
+ if (old_modified)
set_modified();
return retval;
**bot, size_t *bot_x)
{
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)
|| current->lineno > mark_beginbuf->lineno) {
*top = mark_beginbuf;