-
Notifications
You must be signed in to change notification settings - Fork 105
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
Change code viewer from RichText to Scintilla #16
Conversation
Awesome! This was on my list for a while. Could you please update the build instructions? Is keywords.txt still needed? I'd think a syntax highlighter would have its own keyword list. |
Hey :) The build instructions remain unchanged, it's using the same wxWidgets version detailed there. The keywords.txt is still needed, the parser needs a list (or several, if you want) of keywords. The sample provided in wxWidgets uses an inline list for it's example, maybe it would be more interesting to use that, I can check it out if you want to :) |
Hmm, I thought Scintilla was an additional build dependency. All the better then. |
Could you please rebase to squash whitespace and merge commits? Sleepy's codebase is inconsistent with whitespace, but newer additions have used tabs, so I added an A few more nits:
Let me know if you want to handle these, or we can merge and I'll fix these myself. |
Actually never mind, the old version behaves the same. Would be nice to have though. |
I'll rebase, once I find how (I'm very new to git). About the rest:
|
Sounds good to me. One way to squash everything into one commit is to do an interactive rebase ( |
I'm currently using SourceTree, so I'll check how to do it there, and do the changes we discussed. But that'll be tomorrow :) |
About #2, there's a problem. Scintilla only highlights current line if the window has focus (once it loses focus, the highlight is lost). I don't really like windows stealing focus for the sake of it, not to mention that in this case it makes impossible to navigate the function list with the cursors. So I don't think it's a good idea :/ |
OK, I'll think about it. |
Ok, everything done, only the rebase missing, which I'm battling atm |
There's some inconsistent whitespace, BTW. If you use a recent version of VS, you can get an extension which will configure the editor according to |
SourceTree should make rebasing very simple: http://blogs.atlassian.com/2014/06/interactive-rebase-sourcetree/ See squashing (you want to squash all commits into one). |
Yeah, I found that post yesterday, but messed up the squash a few minutes ago and had to restart. I'll check the editorconfig extension (or change the spaces to tabs, as I work with spaces). |
I think I'm having problems because there's a merge from master in the middle of the stream.
Spent +2h trying to rebase all my commits to no avail, I might try it tomorrow, or then think what I want to do with this |
This works for me. What is "origin", this repository or your fork? Is the remote up-to-date? ( |
I could pick this up from here if you like, but I'll rewrite your commits on your behalf. |
I don't know what is origin, I just wrote that: "git rebase -i origin/master". Do I have to change 'origin' for something else? The remote seem to be up to date. No, I would prefer to actually make it myself, but already spent 4x the time to try to squash than I actually spent writing the code, so it's getting a bit frustrating :( |
"origin" is the default name of the remote when you first clone a git repo. Which repo did you clone, https://github.com/VerySleepy/verysleepy or your fork at https://github.com/shashClp/verysleepy ? |
I cloned my fork |
OK, so you need to rebase on top of our master:
|
Thanks, that did the trick, I could do the rebase after 2 merges :D. Sorry to bother you, first time using git :/ So, it's correct now? |
I don't see anything new. Did you push the new branch?
Edit: Also, no worries. |
Yes I did, pushed the changes :S |
Oh, I see. It's not rebasing all commits because you've since merged your branch with master. Here's what I suggest doing:
|
But I'm guessing I'd have to clone from the point I started working, because if I clone now, my head will point to the latest commit, thus no changes can be committed, neither pushed :S If I have to resort to that, I'll probably just start over again, and:
I know steps 5-6 could be avoided by just using the latest files, but I want to go through the process to learn how to do it :) |
Oh, right, because you used the master branch of your fork. (Usually people create a new branch per pull request.) You'd also want to reset your master to the main repository's master. Here's a simpler way:
|
…argin, code clean-up
Well, done. Couldn't try my steps because your instructions seem to have crushed my historic (which I wanted to do through rebase), so I couldn't try it :/ |
If you really want to, you can fish your old commits from the git reflog. What's up with the three-space indent, though? |
Where? Just checked the 4 commited files, and could not see a single occurrence of that :S |
Ah, sorry about that. Had to temporarily use another browser, and Chrome treats tabs differently. |
Change code viewer from RichText to Scintilla
What name should I credit you with in the changelog/about dialog? |
"Bernat Muñoz Garcia" Thanks :) |
Btw, just rebuild it from source, and when you updated wine, dbghelpw.dll wasn't added (my guess it was been prebuilt and added before), so you might want to fix that :D |
Did you get and build the wine submodule, too? |
I suppose I need to update the build instructions... |
Yeah, it's a matter of building it, but it would be nice to add it to the build instructions :) |
Pushed. |
Amazing, thanks! |
|
Oh, cool, it doesn't have the same problems SetCaretLineVisible has :) |
Using Scintilla wxWidgets widget, I changed the code viewer from parsing code and setting up a RichText widget, to letting Scintilla parse it and format it. The advantages are:
What could be improved: