mirror of
https://github.com/react/react-native-devtools-frontend.git
synced 2026-10-10 13:44:39 +08:00
DISABLE_THIRD_PARTY_CHECK=NPM update R=jacktfranklin@chromium.org Bug: none Change-Id: I41b7006f336b9465677cc7434abd70a732c58221 Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2692907 Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org> Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
11 lines
299 B
JavaScript
11 lines
299 B
JavaScript
export default movePoint
|
||
|
||
// Note! `move` only works inside lines! It’s not possible to move past other
|
||
// chunks (replacement characters, tabs, or line endings).
|
||
function movePoint(point, offset) {
|
||
point.column += offset
|
||
point.offset += offset
|
||
point._bufferIndex += offset
|
||
return point
|
||
}
|