More anhancement in cursor handling, immitates more the OS style

This commit is contained in:
Nemh 2015-02-03 23:41:25 +01:00
parent eb7581ca65
commit be202295c4
4 changed files with 12 additions and 6 deletions

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -749,7 +749,12 @@ int Console_Disp()
}
else
{
Print(Line[i + Start_Line].str + Line[i + Start_Line].start_col);
if(Cursor.x > COL_DISP_MAX-1) {
Print(Line[i + Start_Line].str + Line[i + Start_Line].start_col + 1);
}
else {
Print(Line[i + Start_Line].str + Line[i + Start_Line].start_col);
}
}
}
else
@ -782,16 +787,17 @@ int Console_Disp()
}
}
if (Line[i + Start_Line].disp_len - Line[i + Start_Line].start_col > COL_DISP_MAX)
if (Line[i + Start_Line].disp_len - Line[i + Start_Line].start_col > COL_DISP_MAX-1)
{
locate(COL_DISP_MAX, i + 1);
if (Line[i + Start_Line].readonly)
{
Cursor_SetFlashMode(0);
PrintRev((unsigned char *)"\xE6\x9B");
if(Line[i + Start_Line].disp_len - Line[i + Start_Line].start_col != COL_DISP_MAX) {
Cursor_SetFlashMode(0);
PrintRev((unsigned char *)"\xE6\x9B");
}
}
else
else if(Cursor.x < COL_DISP_MAX-1)
{
Print((unsigned char *)"\xE6\x9B");
}