Is your feature request related to a problem? Please describe.
When closing all the tabs for editing text files, if any keys are pressed on the blank canvas would cause an error. The error would cause the whole program to froze and needs to be restarted to continue using.
Describe the solution you'd like
Maybe we can add something, such as when any key is pressed on the blank canvas, then we make a window showing a request to "Add new tab[yes/no]" and make that the highest priority in the program to avoid the program from having an error, while the user can also continue to add tab.
Describe alternatives you've considered
Correct the program's main loop to try except so that the lines executed(errors) will not cause the program to froze.
![Screenshot 2024-01-01 at 11 04 10 PM](https://private-user-images.githubusercontent.com/136956908/293593136-5e03dc8c-2528-413c-8408-d2889174f084.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MTg2OTE0NTksIm5iZiI6MTcxODY5MTE1OSwicGF0aCI6Ii8xMzY5NTY5MDgvMjkzNTkzMTM2LTVlMDNkYzhjLTI1MjgtNDEzYy04NDA4LWQyODg5MTc0ZjA4NC5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjQwNjE4JTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI0MDYxOFQwNjEyMzlaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT1jY2Y5ZDcwYTc0OGVmMWYwZDRjOWRkNzQ5NTdiOGQxZmZiZDZiMjdlYzAyZWVmYzhlMzA1NDNiY2E5YjIwYjZkJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCZhY3Rvcl9pZD0wJmtleV9pZD0wJnJlcG9faWQ9MCJ9.fRFOp_SW4v1BxAaGcgdHls67R7rjQSdpyQDUL292B20)