]> ncurses.scripts.mit.edu Git - ncurses.git/blobdiff - ncurses/tty/lib_mvcur.c
ncurses 6.0 - patch 20160528
[ncurses.git] / ncurses / tty / lib_mvcur.c
index 0b3300b9ef8b5a754063d45ec1e068feeb48f779..ffd42bb1849e4f2e5ca052f47fe2307a73ae783d 100644 (file)
@@ -1,5 +1,5 @@
 /****************************************************************************
- * Copyright (c) 1998-2014,2015 Free Software Foundation, Inc.              *
+ * Copyright (c) 1998-2015,2016 Free Software Foundation, Inc.              *
  *                                                                          *
  * Permission is hereby granted, free of charge, to any person obtaining a  *
  * copy of this software and associated documentation files (the            *
 #define CUR SP_TERMTYPE
 #endif
 
-MODULE_ID("$Id: lib_mvcur.c,v 1.136 2015/07/25 20:14:57 tom Exp $")
+MODULE_ID("$Id: lib_mvcur.c,v 1.137 2016/05/28 23:32:40 tom Exp $")
 
 #define WANT_CHAR(sp, y, x) NewScreen(sp)->_line[y].text[x]    /* desired state */
 
@@ -992,10 +992,10 @@ _nc_real_mvcur(NCURSES_SP_DCLx
        }
 
        if (xold >= screen_columns(SP_PARM)) {
-           int l;
 
            if (SP_PARM->_nl) {
-               l = (xold + 1) / screen_columns(SP_PARM);
+               int l = (xold + 1) / screen_columns(SP_PARM);
+
                yold += l;
                if (yold >= screen_lines(SP_PARM))
                    l -= (yold - screen_lines(SP_PARM) - 1);