buggy - copy copies line sentinel

21 views
Skip to first unread message

Mika Genic

unread,
May 18, 2016, 4:30:29 AM5/18/16
to Firepad
to reproduce open firepad, clear the pad, type:
- bla
- bla
select everything and ctrl+c, paste into another editor - ie notepad

you will see the line sentinel char being pasted.
- fdgdfggfdg
- bla
- bla

(yellow is mine)

I tried to chase this a bit in codemirror, what I see is that in this line: https://github.com/codemirror/CodeMirror/blob/master/lib/codemirror.js#L1267

I can see that cm.getSelections() returns the text with the sentinel even though as I understand it it should not.

Any help ?




Mika Genic

unread,
May 19, 2016, 7:24:23 AM5/19/16
to Firepad
see my discussion with martjin regarding this:


He suggest using bookmarks instead of collapsed ranges for the sentinels, does this make sense in FP ?


Michael Lehenbauer

unread,
May 23, 2016, 11:35:58 AM5/23/16
to Mika Genic, Firepad
Yeah, I wouldn't expect CodeMirror to change the behavior.  And unfortunately, bookmarks won't really serve our needs easily.  Firepad requires there to actually be a character in the data model that we can attach attributes to.  It's not ideal, but that's the way it works for now.



--
You received this message because you are subscribed to the Google Groups "Firepad" group.
To unsubscribe from this group and stop receiving emails from it, send an email to firepad-io+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/firepad-io/6a7b148a-fa68-437d-a6b6-a9ec8200d2e9%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

Mika Genic

unread,
May 23, 2016, 7:20:45 PM5/23/16
to Firepad, mika...@gmail.com
got it. I ended up solving this issue by handling plain rich text copy/cut myself, see latest commit to https://github.com/firebase/firepad/pull/237

https://github.com/firebase/firepad/pull/237 now works great, the travis thing is still broken would love some help there

thx!


Reply all
Reply to author
Forward
0 new messages