-
Notifications
You must be signed in to change notification settings - Fork 104
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
Add nextVisibleWordEnd and prevVisibleWordEnd methods #808
Add nextVisibleWordEnd and prevVisibleWordEnd methods #808
Conversation
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.
Just a quick superficial nitpick. Nothing else jumps out but I'll leave the rest to @poire-z
Yeah, forget the tabs, stick to 4 spaces. There are still some functions with tabs, that we just haven't removed to not add unuseful commits. You may as well add now the prevVisibleWordStart and nextVisibleWordStart even if you don't use them yet. |
… instead of 4 spaces
cre.cpp
Outdated
{"readDefaults", readDefaults}, | ||
{"saveDefaults", saveDefaults}, | ||
{"close", closeDocument}, | ||
{"__gc", closeDocument}, | ||
{NULL, NULL} |
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.
This one stands out a bit. :-P
If you can fix that last tab before |
Looks like you need to fix (in your other PR) the 4 functions. For each of them: if (nodep.isNull())
return 0;
- nodep.nextVisibleWordEnd();
+ if (!nodep.nextVisibleWordEnd())
+ return 0;
lua_pushstring(L, UnicodeToLocal(nodep.toString()).c_str());
return 1; Possibly only needed for the next* ones, but doing if for all is a good thing. Noticable if you highlight some of the last text in a document, and move selection end ++ till you reach end of document. Next move will return false, but move the xpointer to the start of document, making moving back again impossible, highlighting all the document and koreader super slow. |
koreader/koreader-base#814 necessary for koreader#4591 Also includes koreader/koreader-base#809 koreader/koreader-base#808 and koreader/koreader-base#810
koreader/koreader-base#814 necessary for #4591 Also includes koreader/koreader-base#809 koreader/koreader-base#808 and koreader/koreader-base#810
Add two methods that allow us to get the next/previous word from xpointer.