Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
crdt.el
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Qiantan Hong
crdt.el
Commits
5719de1c
Commit
5719de1c
authored
3 years ago
by
Jimmy Miller
Browse files
Options
Downloads
Patches
Plain Diff
Check if the process-mark is non-nil and if mark-pos is non-nil to prevent errors
parent
c427979e
No related branches found
No related tags found
1 merge request
!1
Check if the process-mark is non-nil and if mark-pos is non-nil to prevent errors
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
crdt.el
+11
-8
11 additions, 8 deletions
crdt.el
with
11 additions
and
8 deletions
crdt.el
+
11
−
8
View file @
5719de1c
...
...
@@ -2596,14 +2596,17 @@ The result DIFF can be used in (CRDT--NAPPLY-DIFF OLD DIFF) to reproduce NEW."
(
cl-defun
crdt--send-process-mark-maybe
(
&optional
(
lazy
t
))
(
let
((
buffer-process
(
get-buffer-process
(
current-buffer
))))
(
when
buffer-process
(
let*
((
mark-pos
(
marker-position
(
process-mark
buffer-process
)))
(
current-id
(
crdt--get-id
mark-pos
)))
(
unless
(
and
lazy
(
string-equal
crdt--last-process-mark-id
current-id
))
(
setq
crdt--last-process-mark-id
current-id
)
(
crdt--broadcast-maybe
(
crdt--format-message
`
(
process-mark
,
crdt--buffer-network-name
,
current-id
,
mark-pos
))))))))
(
let*
((
mark
(
process-mark
buffer-process
)))
(
when
mark
(
let*
((
mark-pos
(
marker-position
mark
)))
(
when
mark-pos
(
let*
((
current-id
(
crdt--get-id
mark-pos
)))
(
unless
(
and
lazy
(
string-equal
crdt--last-process-mark-id
current-id
))
(
setq
crdt--last-process-mark-id
current-id
)
(
crdt--broadcast-maybe
(
crdt--format-message
`
(
process-mark
,
crdt--buffer-network-name
,
current-id
,
mark-pos
))))))))))))
(
defun
crdt--process-status-advice
(
orig-func
process
)
(
if
(
crdt--pseudo-process-p
process
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment