1
0
mirror of https://github.com/ianstormtaylor/slate.git synced 2025-07-31 20:40:19 +02:00

update k key handler in core plugin

This commit is contained in:
Ian Storm Taylor
2016-11-29 16:59:28 -08:00
parent 1fd27578fa
commit 2b10e270c6

View File

@@ -519,12 +519,9 @@ function Plugin(options = {}) {
function onKeyDownK(e, data, state) { function onKeyDownK(e, data, state) {
if (!IS_MAC || !data.isCtrl) return if (!IS_MAC || !data.isCtrl) return
const { startOffset, startBlock } = state
return state return state
.transform() .transform()
.deleteForward(startBlock.length - startOffset) .deleteLineForward()
.apply() .apply()
} }