Skip to content

Commit 7625304

Browse files
committed
Merge branch 'regs-sync'
Add 'syncregs' option which defines group of instances that share registers. Patch by Ma_Sys.ma.
2 parents 920e65b + fa119d4 commit 7625304

40 files changed

+2045
-49
lines changed

AUTHORS

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,3 +115,6 @@ John Shea (a.k.a. coachshea) provided fix for the plugin related to neovim.
115115

116116
Daniel Mueller fixed CWD of the process not matching current view after vifm
117117
picked up change in file system.
118+
119+
Ma_Sys.ma implemented 'syncregs' option which defines group of instances that
120+
share registers.

ChangeLog

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,9 @@
5151
Added fnameescape() builtin function, which can be used to escape paths on
5252
construction of :commands. Thanks to filterfalse.
5353

54+
Added 'syncregs' option which defines group of instances that share
55+
registers. Patch by Ma_Sys.ma.
56+
5457
:quit, :wq, :exit, :xit, ZZ and ZQ now try to close current tab before
5558
closing the application.
5659

HACKING.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -182,12 +182,16 @@ there for instructions.
182182
| | |-- filemon.c - file monitoring "object"
183183
| | |-- filter.c - small abstraction over filter driven by a regexp
184184
| | |-- globs.c - provides support of glob patterns
185+
| | |-- gmux_nix.c - implementation of named mutex on *nix
186+
| | |-- gmux_win.c - implementation of named mutex on Windows
185187
| | |-- int_stack.c - int stack "object"
186188
| | |-- log.c - primitive logging
187189
| | |-- matcher.c - file path/name matcher (glob/regexp/mime-type)
188190
| | |-- matchers.c - list of matchers (which are ANDed together)
189191
| | |-- path.c - various functions to work with paths
190192
| | |-- regexp.c - regexp related
193+
| | |-- shmem_nix.c - implementation of named shared memory on *nix
194+
| | |-- shmem_win.c - implementation of named shared memory on Windows
191195
| | |-- str.c - various string functions
192196
| | |-- string_array.c - functions to work with arrays of strings
193197
| | |-- trie.c - 3-way trie implementation

THANKS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,7 @@ Marcos Cruz
9090
Marius Schmidl
9191
Martin Fischer
9292
Marton Balazs (balmar)
93+
Ma_Sys.ma
9394
mateusz28
9495
Merovius
9596
Michael Corvin

TODO

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,6 @@ Possible things to add:
8989
* Reverse searching
9090
* Add g/ and g? commands (search, but don't select files).
9191
* Support true-colors for colorschemes.
92-
* IPC among all running vifm instances (share settings among instances).
9392
* Parse escape sequences in menus as in preview.
9493
* Virtual File System - currently vifm can use FUSE to mount most file
9594
systems.

configure

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8427,6 +8427,47 @@ if test "x$ac_cv_lib_m_pow" = xyes; then :
84278427
fi
84288428
84298429
8430+
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for shm_open in -lrt" >&5
8431+
$as_echo_n "checking for shm_open in -lrt... " >&6; }
8432+
if ${ac_cv_lib_rt_shm_open+:} false; then :
8433+
$as_echo_n "(cached) " >&6
8434+
else
8435+
ac_check_lib_save_LIBS=$LIBS
8436+
LIBS="-lrt $LIBS"
8437+
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8438+
/* end confdefs.h. */
8439+
8440+
/* Override any GCC internal prototype to avoid an error.
8441+
Use char because int might match the return type of a GCC
8442+
builtin and then its argument prototype would still apply. */
8443+
#ifdef __cplusplus
8444+
extern "C"
8445+
#endif
8446+
char shm_open ();
8447+
int
8448+
main ()
8449+
{
8450+
return shm_open ();
8451+
;
8452+
return 0;
8453+
}
8454+
_ACEOF
8455+
if ac_fn_c_try_link "$LINENO"; then :
8456+
ac_cv_lib_rt_shm_open=yes
8457+
else
8458+
ac_cv_lib_rt_shm_open=no
8459+
fi
8460+
rm -f core conftest.err conftest.$ac_objext \
8461+
conftest$ac_exeext conftest.$ac_ext
8462+
LIBS=$ac_check_lib_save_LIBS
8463+
fi
8464+
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_shm_open" >&5
8465+
$as_echo "$ac_cv_lib_rt_shm_open" >&6; }
8466+
if test "x$ac_cv_lib_rt_shm_open" = xyes; then :
8467+
LIBS="$LIBS -lrt"
8468+
fi
8469+
8470+
84308471
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts -pthread" >&5
84318472
$as_echo_n "checking whether C compiler accepts -pthread... " >&6; }
84328473
if ${ax_cv_check_cflags___pthread+:} false; then :

configure.ac

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -384,6 +384,9 @@ dnl Use math library if present (standard doesn't require it to be separated
384384
dnl from libc)
385385
AC_CHECK_LIB(m, pow, [LIBS="$LIBS -lm"])
386386

387+
dnl Enable POSIX shared memory
388+
AC_CHECK_LIB(rt, shm_open, [LIBS="$LIBS -lrt"])
389+
387390
dnl Use pthread library
388391
AX_CHECK_COMPILE_FLAG([-pthread], [
389392
TESTS_CFLAGS="$CFLAGS -pthread"

data/man/vifm.1

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
.TH VIFM 1 "March 31, 2018" "vifm 0.9.1"
1+
.TH VIFM 1 "April 18, 2018" "vifm 0.9.1"
22
.\" ---------------------------------------------------------------------------
33
.SH NAME
44
.\" ---------------------------------------------------------------------------
@@ -4341,6 +4341,16 @@ specifies the delay in ms (500 by default), 'timeoutlen' at most;
43414341
- marks - include marks;
43424342
- registers[:num] - include registers, at most num files (5 by default).
43434343
.TP
4344+
.BI 'syncregs'
4345+
type: string
4346+
.br
4347+
default:
4348+
.br
4349+
Specifies identifier of group of instances that share registers between each
4350+
other. When several instances of vifm have this option set to identical
4351+
value, they automatically synchronize contents of their registers on
4352+
operations which use them.
4353+
.TP
43444354
.BI 'syscalls'
43454355
type: boolean
43464356
.br

data/vim/doc/app/vifm-app.txt

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
*vifm-app.txt* For Vifm version 0.9.1 Last change: 2018 Mar 31
1+
*vifm-app.txt* For Vifm version 0.9.1 Last change: 2018 Apr 18
22

33
Email for bugs and suggestions: <xaizek@posteo.net>
44

@@ -3599,6 +3599,16 @@ values are available:
35993599
- marks - include marks;
36003600
- registers[:num] - include registers, at most num files (5 by default).
36013601

3602+
*vifm-'syncregs'*
3603+
syncregs
3604+
type: string
3605+
default:
3606+
3607+
Specifies identifier of group of instances that share registers between each
3608+
other. When several instances of vifm have this option set to identical
3609+
value, they automatically synchronize contents of their registers on
3610+
operations which use them.
3611+
36023612
*vifm-'syscalls'*
36033613
syscalls
36043614
type: boolean

data/vim/syntax/vifm.vim

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
" vifm syntax file
22
" Maintainer: xaizek <xaizek@posteo.net>
3-
" Last Change: March 31, 2018
3+
" Last Change: April 18, 2018
44
" Inspired By: Vim syntax file by Dr. Charles E. Campbell, Jr.
55

66
if exists('b:current_syntax')
@@ -129,9 +129,10 @@ syntax keyword vifmOption contained aproposprg autochpos caseoptions cdpath cd
129129
\ numberwidth nuw previewprg quickview relativenumber rnu rulerformat ruf
130130
\ runexec scrollbind scb scrolloff so sort sortgroups sortorder sortnumbers
131131
\ shell sh shortmess shm showtabline stal sizefmt slowfs smartcase scs
132-
\ statusline stl suggestoptions syscalls tabscope tabstop timefmt timeoutlen
133-
\ title tm trash trashdir ts tuioptions to undolevels ul vicmd viewcolumns
134-
\ vifminfo vimhelp vixcmd wildmenu wmnu wildstyle wordchars wrap wrapscan ws
132+
\ statusline stl suggestoptions syncregs syscalls tabscope tabstop timefmt
133+
\ timeoutlen title tm trash trashdir ts tuioptions to undolevels ul vicmd
134+
\ viewcolumns vifminfo vimhelp vixcmd wildmenu wmnu wildstyle wordchars wrap
135+
\ wrapscan ws
135136

136137
" Disabled boolean options
137138
syntax keyword vifmOption contained noautochpos nocf nochaselinks nodotfiles

0 commit comments

Comments
 (0)