Skip to content
This repository has been archived by the owner on Apr 19, 2024. It is now read-only.

Patch to add gnome-like copy-paste shortcuts #173

Closed
wants to merge 3,804 commits into from
Closed

Patch to add gnome-like copy-paste shortcuts #173

wants to merge 3,804 commits into from

Conversation

u1735067
Copy link
Contributor

@u1735067 u1735067 commented Nov 7, 2014

This patch will add an option to allow gnome-like copy past shortcuts : Ctrl-Shift-C and Ctrl-Shift-V.
When enabled, it disables the auto copy on select feature (which can be annoying) but leave the right click paste according to the "xterm mouse" setting ("Comprimise" still Right-Paste, but if you select "Windows" you have a no mouse paste behaviour).

The "Detect URLs on selection and launch in browser" settings has been moved to make place for this option (plus, this setting is Windows only and it was in the multiplateform settings).

simon added 30 commits July 11, 2013 17:24
own newline before the one tell_user puts on the end anyway. Also,
while I'm here, make up my mind about whether to prefix messages with
"scp:" or "pscp:" - I choose the latter.


git-svn-id: svn://svn.tartarus.org/sgt/putty@9914 cda61777-01e9-0310-a592-d414129be87e
effect of handling it, but they do not free it if it isn't a packet
they recognise as part of their upload/download. Invent a return value
that specifically signals this, and consistently free pktin at every
call site if that return value comes back. Also, ensure that that
return value also always comes with something meaningful in fxp_error.


git-svn-id: svn://svn.tartarus.org/sgt/putty@9915 cda61777-01e9-0310-a592-d414129be87e
on error paths, although the one in PSFTP's wildcard_iterate will come
up in normal usage.


git-svn-id: svn://svn.tartarus.org/sgt/putty@9916 cda61777-01e9-0310-a592-d414129be87e
not to be redrawn when the user reconfigured the background colour.


git-svn-id: svn://svn.tartarus.org/sgt/putty@9917 cda61777-01e9-0310-a592-d414129be87e
of the GET_32BIT macros and then used as length fields. Missing bounds
checks against zero have been added, and also I've introduced a helper
function toint() which casts from unsigned to int in such a way as to
avoid C undefined behaviour, since I'm not sure I trust compilers any
more to do the obviously sensible thing.


git-svn-id: svn://svn.tartarus.org/sgt/putty@9918 cda61777-01e9-0310-a592-d414129be87e
one missing fclose too.)


git-svn-id: svn://svn.tartarus.org/sgt/putty@9919 cda61777-01e9-0310-a592-d414129be87e
with the usage comment saying you're allowed to pass NULL to find out
only the return value. No caller actually does pass NULL at the
moment.


git-svn-id: svn://svn.tartarus.org/sgt/putty@9920 cda61777-01e9-0310-a592-d414129be87e
warnings about insecure crypto components. The latter may crReturn
(though not in any current implementation, I believe), which
invalidates pktin, which is used by the former.


git-svn-id: svn://svn.tartarus.org/sgt/putty@9921 cda61777-01e9-0310-a592-d414129be87e
custom free function, in case you need to ctrl_alloc a structure which
then has additional dynamically allocated things dangling off it.


git-svn-id: svn://svn.tartarus.org/sgt/putty@9922 cda61777-01e9-0310-a592-d414129be87e
the session saving code, in which the contents of the edit box giving
the current saved session name was stored in a horrid place with a
fixed length. Now it's dangling off sessionsaver_data as it always
ought to have been, and it's dynamically reallocated to the
appropriate length, and there's a free function that cleans it up at
the end of the dialog's lifetime.


git-svn-id: svn://svn.tartarus.org/sgt/putty@9923 cda61777-01e9-0310-a592-d414129be87e
(it would trigger if !type==RSA and !type==DSA, but one of those must
have been true to get there in the first place) and erroneous (it
would return NULL without going through the cleanup code). Since the
code's internal structure guarantees that path isn't reached, replace
it with an assert.


git-svn-id: svn://svn.tartarus.org/sgt/putty@9924 cda61777-01e9-0310-a592-d414129be87e
git-svn-id: svn://svn.tartarus.org/sgt/putty@9925 cda61777-01e9-0310-a592-d414129be87e
header text from a PuTTY key file.

(It's silly to have both while (len > 0) at the top of the loop _and_
an if (len == 0) return in the middle, and in fact the former was the
erroneous one since it would have prohibited a 39-character header,
which I intended to be permitted.)


git-svn-id: svn://svn.tartarus.org/sgt/putty@9926 cda61777-01e9-0310-a592-d414129be87e
crWaitUntilV(pktin) with plain crReturnV, because those coroutines can
be called back either with a response packet from the channel request
_or_ with NULL by ssh_free meaning 'please just clean yourself up'.


git-svn-id: svn://svn.tartarus.org/sgt/putty@9927 cda61777-01e9-0310-a592-d414129be87e
declarations, and gcc didn't complain but VC did.


git-svn-id: svn://svn.tartarus.org/sgt/putty@9928 cda61777-01e9-0310-a592-d414129be87e
calling random_byte has previously called random_ref.

(I'm not aware of any current code getting this wrong! It just seems
to me to be the sort of thing you'd want to be really sure of.)


git-svn-id: svn://svn.tartarus.org/sgt/putty@9930 cda61777-01e9-0310-a592-d414129be87e
really fail, but might as well be careful.


git-svn-id: svn://svn.tartarus.org/sgt/putty@9931 cda61777-01e9-0310-a592-d414129be87e
that the user really ought to know but that are not actually fatal to
continued operation of PuTTY or a single network connection.


git-svn-id: svn://svn.tartarus.org/sgt/putty@9932 cda61777-01e9-0310-a592-d414129be87e
error reporting function.


git-svn-id: svn://svn.tartarus.org/sgt/putty@9933 cda61777-01e9-0310-a592-d414129be87e
git-svn-id: svn://svn.tartarus.org/sgt/putty@9934 cda61777-01e9-0310-a592-d414129be87e
nonzero rather than zero.


git-svn-id: svn://svn.tartarus.org/sgt/putty@9935 cda61777-01e9-0310-a592-d414129be87e
git-svn-id: svn://svn.tartarus.org/sgt/putty@9936 cda61777-01e9-0310-a592-d414129be87e
git-svn-id: svn://svn.tartarus.org/sgt/putty@9937 cda61777-01e9-0310-a592-d414129be87e
briefly worried that it might not be doing what I thought it was
doing, but examining these diagnostics shows that it is after all, and
now I've written them it would be a shame not to keep them for future
use.


git-svn-id: svn://svn.tartarus.org/sgt/putty@9938 cda61777-01e9-0310-a592-d414129be87e
git-svn-id: svn://svn.tartarus.org/sgt/putty@9939 cda61777-01e9-0310-a592-d414129be87e
error returns.


git-svn-id: svn://svn.tartarus.org/sgt/putty@9940 cda61777-01e9-0310-a592-d414129be87e
gather extra entropy at Windows PuTTY startup time. (It's only used as
one of the inputs to PuTTY's internal entropy pool, so nobody is
required to trust it.)


git-svn-id: svn://svn.tartarus.org/sgt/putty@9941 cda61777-01e9-0310-a592-d414129be87e
ToAsciiEx, where possible.

This enables support for keys which generate Unicode characters that
aren't in the system code page, which seems to me like a perverse way
for Windows to have set up the system code page but apparently does
happen, e.g. (I'm told) U+0219 and U+021B on Romanian keyboards.

Patch mostly due to Andrei Damian-Fekete.


git-svn-id: svn://svn.tartarus.org/sgt/putty@9942 cda61777-01e9-0310-a592-d414129be87e
immediately after conf_deserialise in the Duplicate Session receiver,
whereas I should have put it after the subsequent loop that extracts
the pty argv if any.


git-svn-id: svn://svn.tartarus.org/sgt/putty@9943 cda61777-01e9-0310-a592-d414129be87e
ssh.com and OpenSSH key import loops, we should also null it out so
that the cleanup path doesn't try to re-free the same pointer.


git-svn-id: svn://svn.tartarus.org/sgt/putty@9944 cda61777-01e9-0310-a592-d414129be87e
FauxFaux and others added 25 commits October 20, 2013 17:09
Allow connection_fatal to trigger a reconnect attempt, which, if there is
still an issue, which eventually call connection_fatal.  This causes us to
retry indefinitely.  Maybe eventually we'll need to limit this somehow
(exponential backoff?).

Also:
 * Remove wakeup reconnect delay.  Infinite reconnects will fix this itself.
 * Make a dns error a normal connection_fatal.  Oh dear, oh dear.  This was
     hardcoded to just messagebox and outright exit(0);.  Now we keep
     going for a tiny bit, so that we can run the normal cleanup code.
     This is the tiny cleanups to ssh.c.
Add Paste Delay option under Window, the same as TeraTerm has and other
SSH clients.

When staging configuration changes in notepad or whatever to then be
bulk pasted into an SSH session for a network device.. router, switch,
firewall, load balancer etc.. they don't like having 100+ lines of
config commands sent at them in one blast which putty does by default.
This result in some of the config lines being dropped or interpreted out
of order by the device.

This patch adds a new option which just sleeps for the specified
duration after each line break in the paste buffer, before sending.
Storage type is now a global setting.  This removes a lot of complexity.

File settings are checked by default, if they don't exist, then the
registry is honoured.

Now that it's gone, I can't see any advantages to the old code, so I'm
guessing there's a glaring omission here somewhere. (Famous last words.)
To be revisited at a later date.

This reverts commit 1ca64ea.
This reverts commit 445f9f5.
This reverts commit 6fd9b21.
CHAN_AGENT channels need c->u.a.message to be either NULL or valid
dynamically allocated memory, because it'll be freed by
ssh_channel_destroy. This bug triggers if an agent forwarding channel
is opened and closed without having sent any queries.

git-svn-id: svn://svn.tartarus.org/sgt/putty@10032 cda61777-01e9-0310-a592-d414129be87e
(Forgive me, I'm sick.)
This, annoyingly, breaks cancelling the dialog with the escape key.
Should this work?  Probably.  Annoying.  Very annoying.  I'm not so
concerned about the problem, as I don't think the help is useful, modern
or actually wanted by most people using it.

Cancellation works by:
 * ssd->cancelbutton->button.iscancel = TRUE;
 * if (ctrl->button.iscancel) actual_base_id = IDCANCEL;
 * When someone presses escape, Windows generates a WM_COMMAND(IDCANCEL)
  * This is not documented anywhere sensible.  Nowhere.  NOWHERE.

Maybe we could hijack the WM_COMMAND before it arrives at the button
handler, or something?  Shrug.
I knew that would go wrong.  Dammit.

Re-review that code for possible horrors.  I'm still not happy with
backhandle possibly being junk, but nothing should really get far enough
to notice (famous last words).  Still going with it being better to run
stuff, than to not run it.
While fetching session list from files, ignore folders and fetch next
available session file instead of returning null.

If you happen to have a stray folder in the sessions folder, then the
order in which FindNextFile() gets files is uncertain. And often we end up
seeing a folder traversed in the middle of several session files.

This issue is easily reproducable if we have lots of session files that
start with different names and a folder.
GH-137: Fix crash on startup when loading from Windows Registry
@u1735067
Copy link
Contributor Author

It can be merged if you want to implement this feature, using it since creation & with 0.63t22 without problem.
It could be tunned to deselect text on shortcut activation (simple boolean, not tested though).

@u1735067
Copy link
Contributor Author

Hey @FauxFaux, any chance you'll consider this feature's pull request ? Using it every day, no more miscopy/paste with this.

NHellFire added a commit to NHellFire/PuTTYTray that referenced this pull request Aug 29, 2016
@FauxFaux FauxFaux closed this Apr 22, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet