Re: MacOS paste issue

From: mitchell <mforal.n....at.gmail.com>
Date: Tue, 25 May 2010 18:55:13 -0700 (PDT)

Okay, committed. Thanks.

On May 25, 11:40 am, Jay <robert.jay.go....at.gmail.com> wrote:
> Hey,
>
> yup this worked. It also enabled the menu>edit>paste (of course,
> hadn't realized my quick-fix didn't take that into account until now)
>
> -Jay
>
> On May 25, 8:45 am, mitchell <mforal.n....at.gmail.com> wrote:
>
>
>
> > Hi,
>
> > Does the following work in Mac OSX if you place it in ~/.textadept/
> > init.lua?:
>
> > textadept.events.add_handler('buffer_new',
> >   function()
> >     buffer.paste = function()
> >       local clipboard_text = textadept.clipboard_text
> >       if #clipboard_text > 0 then buffer:replace_sel(clipboard_text)
> > end
> >     end
> >   end)
>
> > (Please create a new buffer since the default buffer opened may not
> > have this function yet since user init.lua is loaded later)
>
> > Mitchell
>
> > On May 21, 2:47 am, Jay <robert.jay.go....at.gmail.com> wrote:
>
> > > Here is a quick fix I'm using for the issue, a custom paste function:
>
> > > function paste()
> > >                 if textadept.clipboard_text and #textadept.clipboard_text>0 then
> > >                         local next_pos = buffer.current_pos+#textadept.clipboard_text
> > >                         if #buffer:get_sel_text()>0 then
> > >                                 buffer:replace_sel(textadept.clipboard_text)
> > >                         else
> > >                                 buffer:insert_text(buffer.current_pos,textadept.clipboard_text)
> > >                         end
> > >                         buffer:goto_pos(next_pos)
> > >                 end
> > >         end
>
> > > -Jay
>
> > > On May 18, 2:17 am, mitchell <mforal.n....at.gmail.com> wrote:
>
> > > > Jay,
>
> > > > On May 17, 12:29 pm, Jay <robert.jay.go....at.gmail.com> wrote:
>
> > > > > As a test I downloaded TA2.0 and paste works, so I kept trying and it
> > > > > works up until textadept_2.2_beta.osx.zip and stops working in
> > > > > textadept_2.2_beta2.osx.zip.  Apparently some change in between these
> > > > > two releases is the cause.
>
> > > > > Haven't pinpointed it down any further yet as I need to get some
> > > > > sleep.
>
> > > > Ugh, it has to do with the kill-ring removal. You'll notice a
> > > > difference in key_commands.lua from 2.0 to 2.2. I'll have to find some
> > > > way around it.
>
> > > > Mitchell
>
> > > > > -Jay
>
> > > > > On May 18, 12:51 am, Jay <robert.jay.go....at.gmail.com> wrote:
>
> > > > > > Not sure when it happened, since I use TA mostly at work on a Windows
> > > > > > machine, but at home on my Mac I'm having issues with pasting.
> > > > > > Apparently it just doesn't work. No idea what's the cause yet, but I
> > > > > > do know that it doesn't seem to be the key mapping, as pasting from
> > > > > > the toolbar or context menu also fail.
>
> > > > > > Anyone else with the same problem on the Mac?
>
> > > > > > --
> > > > > > You received this message because you are subscribed to the Google Groups "textadept" group.
> > > > > > To post to this group, send email to textadept.at.googlegroups.com.
> > > > > > To unsubscribe from this group, send email to textadept+unsubscribe.at.googlegroups.com.
> > > > > > For more options, visit this group athttp://groups.google.com/group/textadept?hl=en.
>
> > > > > --
> > > > > You received this message because you are subscribed to the Google Groups "textadept" group.
> > > > > To post to this group, send email to textadept.at.googlegroups.com.
> > > > > To unsubscribe from this group, send email to textadept+unsubscribe.at.googlegroups.com.
> > > > > For more options, visit this group athttp://groups.google.com/group/textadept?hl=en.
>
> > > > --
> > > > You received this message because you are subscribed to the Google Groups "textadept" group.
> > > > To post to this group, send email to textadept.at.googlegroups.com.
> > > > To unsubscribe from this group, send email to textadept+unsubscribe.at.googlegroups.com.
> > > > For more options, visit this group athttp://groups.google.com/group/textadept?hl=en.
>
> > > --
> > > You received this message because you are subscribed to the Google Groups "textadept" group.
> > > To post to this group, send email to textadept.at.googlegroups.com.
> > > To unsubscribe from this group, send email to textadept+unsubscribe.at.googlegroups.com.
> > > For more options, visit this group athttp://groups.google.com/group/textadept?hl=en.
>
> > --
> > You received this message because you are subscribed to the Google Groups "textadept" group.
> > To post to this group, send email to textadept.at.googlegroups.com.
> > To unsubscribe from this group, send email to textadept+unsubscribe.at.googlegroups.com.
> > For more options, visit this group athttp://groups.google.com/group/textadept?hl=en.
>
> --
> You received this message because you are subscribed to the Google Groups "textadept" group.
> To post to this group, send email to textadept.at.googlegroups.com.
> To unsubscribe from this group, send email to textadept+unsubscribe.at.googlegroups.com.
> For more options, visit this group athttp://groups.google.com/group/textadept?hl=en.
Received on Tue 25 May 2010 - 21:55:13 EDT

This archive was generated by hypermail 2.2.0 : Thu 08 Mar 2012 - 11:46:23 EST