karaoke-dev / karaoke

Will be the best karaoke system.
http://blog.karaoke.dev
GNU General Public License v3.0
205 stars 16 forks source link

Should be able to check if the index in the caret position is valid in the ctor. #2101

Open andy840119 opened 1 year ago

andy840119 commented 1 year ago
image

For example, here's the TimeTagCaretPosition. Need to :

andy840119 commented 1 year ago

[Update]

  1. The change index out of range logic is already in the CaretPositionAlgorithm.PositionMovable().
  2. It might be possible to give the caret position in the caret position algorithm. Using try-catch in the algorithm is not a good idea.
  3. check the check-caret-index-is-valid-in-caret-position in my repo.