Bug fixed: cursor shaping in mode swithching produce wrong results for

non-fat cursors, cursor_start goes beyond font size.
This commit is contained in:
Andrey A. Chernov 1994-09-27 11:40:02 +00:00
parent 169cd910b7
commit 7b3e881e50
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=3141
3 changed files with 15 additions and 6 deletions

View File

@ -34,7 +34,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* $Id: syscons.c,v 1.56 1994/09/25 02:06:51 ache Exp $
* $Id: syscons.c,v 1.57 1994/09/27 01:50:07 ache Exp $
*/
#include "sc.h"
@ -2634,7 +2634,10 @@ setup_mode:
font_size = *(modetable + 2);
/* change cursor type if set */
if (scp->cursor_start != -1 && scp->cursor_end != -1)
cursor_shape(scp->cursor_start,
cursor_shape(
(scp->cursor_start >= font_size)
? font_size - 1
: scp->cursor_start,
(scp->cursor_end >= font_size)
? font_size - 1
: scp->cursor_end);

View File

@ -34,7 +34,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* $Id: syscons.c,v 1.56 1994/09/25 02:06:51 ache Exp $
* $Id: syscons.c,v 1.57 1994/09/27 01:50:07 ache Exp $
*/
#include "sc.h"
@ -2634,7 +2634,10 @@ setup_mode:
font_size = *(modetable + 2);
/* change cursor type if set */
if (scp->cursor_start != -1 && scp->cursor_end != -1)
cursor_shape(scp->cursor_start,
cursor_shape(
(scp->cursor_start >= font_size)
? font_size - 1
: scp->cursor_start,
(scp->cursor_end >= font_size)
? font_size - 1
: scp->cursor_end);

View File

@ -34,7 +34,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* $Id: syscons.c,v 1.56 1994/09/25 02:06:51 ache Exp $
* $Id: syscons.c,v 1.57 1994/09/27 01:50:07 ache Exp $
*/
#include "sc.h"
@ -2634,7 +2634,10 @@ setup_mode:
font_size = *(modetable + 2);
/* change cursor type if set */
if (scp->cursor_start != -1 && scp->cursor_end != -1)
cursor_shape(scp->cursor_start,
cursor_shape(
(scp->cursor_start >= font_size)
? font_size - 1
: scp->cursor_start,
(scp->cursor_end >= font_size)
? font_size - 1
: scp->cursor_end);