You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
koreader/frontend/apps/reader/modules
Aleksa Sarai 3fd931bb2f
readerhighlight: ignore cases where no text is selected (#8399)
It's possible for the user to have selected nothing, and trying to
operate on the nil highlight can cause confusion or crashes. This
restores the behaviour before commit 7a0e3d5e68 ("readerhighlight:
remove selected_word and use selected_text everywhere"), which missed
this case.

In addition, add some debug guards to ReaderHighlight methods which
cannot handle selected_text being nil (or at least, shouldn't be called
with selected_text being nil).

Fixes: 7a0e3d5e68 ("readerhighlight: remove selected_word and use selected_text everywhere")
Signed-off-by: Aleksa Sarai <cyphar@cyphar.com>
3 years ago
..
readeractivityindicator.lua ReaderActivityIndicator: fix isStub() 3 years ago
readerback.lua make sure ReaderLink gets a deep copy of location 3 years ago
readerbookmark.lua Bookmarks: icon by type, combined view, filter, bulk remove (#8347) 3 years ago
readerconfig.lua Fix scrolling, add inertial scroll on non-eInk devices 3 years ago
readercoptlistener.lua SpinWidget: similar size in portrait and landscape (#8226) 3 years ago
readercropping.lua ReaderZooming: Unconditionally update the configurables on SetZoomMode (#7735) 3 years ago
readerdevicestatus.lua Readerdevicestatus: optimize code (#8194) 3 years ago
readerdictionary.lua languagesupport: check that ui.languagesupport is non-nil 3 years ago
readerdogear.lua LuaSettings: Add a method to initialize a setting properly (#7371) 3 years ago
readerflipping.lua Update UI layout code to use new SVG icons 3 years ago
readerfont.lua bump crengine: support for 'box-sizing', and other fixes 3 years ago
readerfooter.lua ReaderFooter: Add a compact prefix for frontlight_warmth 3 years ago
readergoto.lua Menu/GoTo: tweak go to page/letter dialog layout (#8056) 3 years ago
readerhighlight.lua readerhighlight: ignore cases where no text is selected (#8399) 3 years ago
readerhinting.lua minor(readerhinting): access document directly instead of from ui 8 years ago
readerkoptlistener.lua Kopt/Creoptions: change to using an event to update configurable. Abstract implimentation out of ConfigDialog 3 years ago
readerlink.lua ReaderLink: option to add location to stack on opening book (#7685) 3 years ago
readermenu.lua Page overlap: long-press to set as default (#8180) 3 years ago
readerpagemap.lua SpinWidget: similar size in portrait and landscape (#8226) 3 years ago
readerpaging.lua Page overlap: long-press to set as default (#8180) 3 years ago
readerpanning.lua feat: add logger module & rewrite kobo suspend script in lua 7 years ago
readerrolling.lua ProgressWidget: Simplify painting logic. 3 years ago
readerrotation.lua [doc] Tag @todo, @fixme and @warning (#5244) 5 years ago
readerscrolling.lua Fix scrolling, add inertial scroll on non-eInk devices 3 years ago
readersearch.lua ReaderSearch: remove stray newline from regex help (#8358) 3 years ago
readerstatus.lua BookStatusWidget: fix status toggle (#8329) 3 years ago
readerstyletweak.lua Standardize: long-press/hold to long-press (#8185) 3 years ago
readertoc.lua SpinWidget: similar size in portrait and landscape (#8226) 3 years ago
readertypeset.lua Revert "Hyphenation: add custom hyphenation rules (#7746)" (#7785) 3 years ago
readertypography.lua ReaderTypography: Hyphenation Limits keep size in rotation 3 years ago
readeruserhyph.lua FileManager: allow case sensitive file search (#7956) 3 years ago
readerview.lua Page overlap: long-press to set as default (#8180) 3 years ago
readerwikipedia.lua Standardize select/choose to choose (#8128) 3 years ago
readerzooming.lua SpinWidget: similar size in portrait and landscape (#8226) 3 years ago