New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Some changes about tabs #71
Conversation
Use AppWindow::openFile() for opening files. Thus fix bug of opening files via command line arguments / drag & drop. Duplicate files were not detected when opening via these two ways before.
Hi ouuan |
Segment fault in the following situations are fixed: 1. all tabs are closed, apply settings in preference window 2. all tabs are closed, received a competitive companion request After fixing, if all tabs are closed and a competitive companion request is received, a new tab will be opened for it.
This is the same as many other text editors, for example, Sublime Text. "Unsaved file" is a little confusing, it may be understood as "file with unsaved changes".
I'm solving a segmentation fault introduced in 358c3fe, please wait before merge. |
To reproduce the segmentation fault:
If you switch to the first tab and close the second one, everything works well. Deleting https://github.com/coder3101/cp-editor/blob/358c3feaacff46b1807f0697dd7526b1fb9a245b/src/appwindow.cpp#L230 will solve this segmentation fault (but I can't delete it). But calling Do you have ideas on how to solve this? |
I think I got the reason, switch to a tab will cause a |
To reproduce the segmentation fault: 1. open the editor 2. open a new tab (then there are two tabs, and the current tab is the second one) 3. close the first tab If you switch to the first tab and close the second one, everything works well. It's caused by not updated windowIndex. It's fixed by updating windowsIndex in onTabChanged().
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should I merge it now?
OK, you can merge it. |
See the commit messages for more information.