mirror of
https://git.hardenedbsd.org/hardenedbsd/HardenedBSD.git
synced 2024-12-28 05:55:27 +01:00
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:
parent
169cd910b7
commit
7b3e881e50
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=3141
@ -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);
|
||||
|
@ -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);
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user