From 160b549dc3d8c8af4cba0b6ef426757039f8ae49 Mon Sep 17 00:00:00 2001 From: David Baker Date: Wed, 21 Jun 2023 12:24:43 -0600 Subject: [PATCH] Fix column resize handle logic --- src/columnresizing.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/columnresizing.ts b/src/columnresizing.ts index 188b6692..ed201920 100644 --- a/src/columnresizing.ts +++ b/src/columnresizing.ts @@ -365,12 +365,12 @@ export function handleDecorations( const col = map.colCount($cell.pos - start) + $cell.nodeAfter!.attrs.colspan; for (let row = 0; row < map.height; row++) { const index = col + row * map.width - 1; - // For positions that are have either a different cell or the end + // For positions that have either a different cell or the end // of the table to their right, and either the top of the table or // a different cell above them, add a decoration if ( (col == map.width || map.map[index] != map.map[index + 1]) && - (row == 0 || map.map[index - 1] != map.map[index - 1 - map.width]) + (row == 0 || map.map[index] != map.map[index - map.width]) ) { const cellPos = map.map[index]; const pos = start + cellPos + table.nodeAt(cellPos)!.nodeSize - 1;