Skip to content

Commit

Permalink
fbobjc/Libraries/Lexical
Browse files Browse the repository at this point in the history
Differential Revision: D58514025

fbshipit-source-id: 04d1ae54f381613c7446ffb19be3718a9b377f3c
  • Loading branch information
generatedunixname89002005287564 authored and facebook-github-bot committed Jun 17, 2024
1 parent be421e7 commit 91b6102
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
6 changes: 2 additions & 4 deletions Lexical/Core/Selection/SelectionUtils.swift
Original file line number Diff line number Diff line change
Expand Up @@ -575,8 +575,7 @@ private func resolveSelectionPointOnBoundary(
if
let prevSibling = prevSibling as? ElementNode,
!isCollapsed,
prevSibling.isInline()
{
prevSibling.isInline() {
point.key = prevSibling.key
point.offset = prevSibling.getChildrenSize()
point.type = .element
Expand Down Expand Up @@ -644,8 +643,7 @@ internal func normalizeSelectionPointsForBoundaries(
if
editor.isComposing(),
editor.compositionKey != anchor.key,
let lastSelection = lastSelection as? RangeSelection
{
let lastSelection = lastSelection as? RangeSelection {
let lastAnchor = lastSelection.anchor
let lastFocus = lastSelection.focus
anchor.key = lastAnchor.key
Expand Down
3 changes: 1 addition & 2 deletions Lexical/Core/Utils.swift
Original file line number Diff line number Diff line change
Expand Up @@ -567,8 +567,7 @@ public func getAdjacentNode(
let focusNode = try focus.getNode()
if
(isBackward && focusOffset == 0) ||
(!isBackward && focusOffset == focusNode.getTextContentSize())
{
(!isBackward && focusOffset == focusNode.getTextContentSize()) {
let possibleNode = isBackward
? focusNode.getPreviousSibling()
: focusNode.getNextSibling()
Expand Down

0 comments on commit 91b6102

Please sign in to comment.