This lets the clipboard support depend on a cargo feature flag, which is enabled by default.
This means no visible change for normal users.
Disabling OS clipboard support can be useful when using Amp on e.g. Linux servers, which normally do not have libxcb installed.
Being able to use Amp in embedded or server environment is very useful, not having to use different editors across different machines.
The clipboard selection mechanism in src/models/application/clipboard/mod.rs was the cleanest way I found to do that. We could use the cfg_if crate to simplify it a bit, but I don't think it would worth for the few lines introduced by this.
I've also updated the clipboard crate, which pulls in a new version of the x11-clipboard crate. This in turn now requires libxcb-xfixes and libxcb-shape to be installed, which required the Travis CI config to be updated. This libraries should be installed on any X11 system out there, so again no visible change.
[ My 2 cents: Travis CI will soon be shutdown, so Amp could/should switch to GitHub actions. I can do that too via a future PR, it shouldn't be much of a hassle. ]
This PR was automatically closed when the master branch was renamed to main. If you'd still like to have these changes reviewed and merged, please re-open this PR against the new main branch! 😁
This lets the clipboard support depend on a cargo feature flag, which is enabled by default. This means no visible change for normal users.
Disabling OS clipboard support can be useful when using Amp on e.g. Linux servers, which normally do not have
libxcb
installed. Being able to use Amp in embedded or server environment is very useful, not having to use different editors across different machines.The clipboard selection mechanism in
src/models/application/clipboard/mod.rs
was the cleanest way I found to do that. We could use thecfg_if
crate to simplify it a bit, but I don't think it would worth for the few lines introduced by this.I've also updated the
clipboard
crate, which pulls in a new version of thex11-clipboard
crate. This in turn now requireslibxcb-xfixes
andlibxcb-shape
to be installed, which required the Travis CI config to be updated. This libraries should be installed on any X11 system out there, so again no visible change.[ My 2 cents: Travis CI will soon be shutdown, so Amp could/should switch to GitHub actions. I can do that too via a future PR, it shouldn't be much of a hassle. ]