mirror of
https://github.com/DragonOS-Community/DragonOS.git
synced 2025-06-18 08:06:32 +00:00
Patch shell cursor (#59)
* 调整代码减少bug * 修复换行光标bug Co-authored-by: longjin <longjin@RinGoTek.cn>
This commit is contained in:
@ -398,7 +398,6 @@ uint64_t do_open(const char *filename, int flags)
|
||||
|
||||
// 寻找文件
|
||||
struct vfs_dir_entry_t *dentry = vfs_path_walk(path, 0);
|
||||
|
||||
if (dentry == NULL && flags & O_CREAT)
|
||||
{
|
||||
// 先找到倒数第二级目录
|
||||
|
@ -181,7 +181,8 @@ static int __textui_putchar_window(struct textui_window_t *window, uint16_t char
|
||||
++vline->index;
|
||||
textui_refresh_characters(window, window->vline_operating, vline->index - 1, 1);
|
||||
// 换行
|
||||
if (vline->index >= window->chars_per_line)
|
||||
// 加入光标后,因为会识别光标,所以需超过该行最大字符数才能创建新行
|
||||
if (vline->index > window->chars_per_line)
|
||||
{
|
||||
__textui_new_line(window, window->vline_operating);
|
||||
}
|
||||
@ -295,7 +296,7 @@ int textui_putchar(uint16_t character, uint32_t FRcolor, uint32_t BKcolor)
|
||||
/**
|
||||
* @brief 初始化text ui框架
|
||||
*
|
||||
* @return int
|
||||
* @return int
|
||||
*/
|
||||
int textui_init()
|
||||
{
|
||||
|
Reference in New Issue
Block a user