Applying Patches

Discuss any topics about the editor here

Applying Patches

Postby cashlessklay » Sat Oct 27, 2012 3:56 pm

I am a bit new to coding in general, so perhaps I am not understanding the process fully... but how can I apply patches to my install of Editra?

The "shift+backspace = delete" issue has been annoying me, and I was glad to find that there has been a patch written to correct it, which I have downloaded.

But now I am unsure what to do with the patch. Is there a particular place where I can copy this patch in order for it to become active? Or are patches only applied by the developers of Editra?

Thanks.
cashlessklay
Limited User
 
Posts: 3
Joined: Sat Oct 27, 2012 3:50 pm

Re: Applying Patches

Postby cody » Sun Oct 28, 2012 3:58 pm

where did you get this patch from?

what version of editra?

what action should be associated with shift+backspace?
User avatar
cody
Site Admin
 
Posts: 1315
Joined: Mon Oct 09, 2006 2:49 am
Location: United States

Re: Applying Patches

Postby cashlessklay » Mon Oct 29, 2012 11:02 am

http://code.google.com/p/editra/issues/detail?id=721

Editra version 0.7.12 on Mac OSX 10.7.2

I would expect Shift+Backspace to be the same as Backspace alone, as I believe it is in almost every program I've used before. Currently the combinaton acts like a Delete key, but that is duplicating functionality, since in Mac OSX Fn+Backspace acts like a Delete key.

In the post referenced, you said that it would be better to integrate this solution into the keybinding system, rather than apply a patch. Is this something that I can do myself, rather than using the patch?

Thanks.
cashlessklay
Limited User
 
Posts: 3
Joined: Sat Oct 27, 2012 3:50 pm

Re: Applying Patches

Postby cody » Mon Oct 29, 2012 2:48 pm

Ok, thought this sounded familiar.

If your using a binary version of Editra the patch won't do you any good since its a patch against the source code. If you want to use the patch the changes in it need to be applied against the source code. At this point it is likely they would need to be manually applied as the source has likely changed since that patch was generated.

I will make a note about changing this in the next release which I hope to make sooner than later. However still kind of interested on details about this use case as I cant think of a time I had both the shift and the backspace key pressed at the same time.
User avatar
cody
Site Admin
 
Posts: 1315
Joined: Mon Oct 09, 2006 2:49 am
Location: United States

Re: Applying Patches

Postby cashlessklay » Mon Oct 29, 2012 4:21 pm

Awesome, thanks.

As for use case, I've been learning PHP and MySQL, and when using global variables and issuing SQL queries, I'm often using a lot of capital letters. I'm not sure if other coders simply use the Caps Lock or what, but I tend to hold shift and type out the variable name. If I make a typing mistake in the middle of one of these all caps words, I tend to simply leave the shift key depressed and hit the backspace a few times. Since I've never encountered a program where shift+backspace does anything other than backspace, I'm always unpleasantly reminded of this slight difference in keymapping when code following the cursor gets pulled back and eaten up, requiring me to Undo and correct.

Like I said, I'm relatively new to coding, and may simply not be accustomed to making each keystroke count, but this slight difference from standard keymappings seems to be unnecessary and overly cumbersome to anyone who is used to not needing to release the shift key in order to backspace.

All that being said, Editra is a great program. Thanks.
cashlessklay
Limited User
 
Posts: 3
Joined: Sat Oct 27, 2012 3:50 pm

Re: Applying Patches

Postby cody » Mon Oct 29, 2012 6:40 pm

Thanks for the additional information. I can see the potential for this issue now and agree that it should not behave this way.

I will simply remove this key stroke since the forward delete can be handled by Fn+Backspace already.
User avatar
cody
Site Admin
 
Posts: 1315
Joined: Mon Oct 09, 2006 2:49 am
Location: United States

Re: Applying Patches

Postby cody » Tue Oct 30, 2012 1:45 am

change committed to current svn for next release.
User avatar
cody
Site Admin
 
Posts: 1315
Joined: Mon Oct 09, 2006 2:49 am
Location: United States


Return to General Discussion

Who is online

Users browsing this forum: No registered users and 1 guest

cron