Archive of RubyForge sup-devel mailing list
 help / color / mirror / Atom feed
* [PATCHES] resubmitted: Squash of various UTF-8 fixes for ruby 1.9 compatability, and update status on jump.
@ 2010-10-07 10:30 Gaute Hope
  2010-10-08  4:18 ` Rich Lane
  0 siblings, 1 reply; 2+ messages in thread
From: Gaute Hope @ 2010-10-07 10:30 UTC (permalink / raw)
  To: sup-devel; +Cc: Rich Lane

[-- Attachment #1: Type: text/plain, Size: 536 bytes --]

Hi,

resubmitting a squashed version of the three patches:
2010-10-04 adc49a0 Gaute Hope UTF-8 label completion: Convert existing labels (gaute/master, gaute)
2010-09-17 009cda0 Gaute Hope Also force encoding on label search completion
2010-09-09 c78e53f Gaute Hope Force UTF-8 on label and contact completion

And one for updating status on jump:
2010-09-23 64b739c Gaute Hope Update status on jump on line in line-cursor-mode

All four are available on (master):
http://gitorious.org/~gauteh/sup/gautehs-mainline

Best regards, Gaute

[-- Attachment #2: 0001-Update-status-on-jump-on-line-in-line-cursor-mode.patch --]
[-- Type: application/octet-stream, Size: 924 bytes --]

From 64b739c6ba7213e325d49e793728ffbfda04b8ba Mon Sep 17 00:00:00 2001
From: Gaute Hope <eg@gaute.vetsj.com>
Date: Thu, 23 Sep 2010 12:29:59 +0200
Subject: [PATCH] Update status on jump on line in line-cursor-mode

The line number isn't updated in the status field when you jump to the
end or beginning, or do page up or down before the next redraw is done.

Updating the status manually in set_cursor_pos.
---
 lib/sup/modes/line-cursor-mode.rb |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/lib/sup/modes/line-cursor-mode.rb b/lib/sup/modes/line-cursor-mode.rb
index 1bd4ed1..1cae994 100644
--- a/lib/sup/modes/line-cursor-mode.rb
+++ b/lib/sup/modes/line-cursor-mode.rb
@@ -66,6 +66,7 @@ protected
     return if @curpos == p
     @curpos = p.clamp @cursor_top, lines
     buffer.mark_dirty
+    set_status
   end
 
   ## override search behavior to be cursor-based. this is a stupid
-- 
1.7.3


[-- Attachment #3: 0001-Force-UTF-8-on-label-and-contact-completion-squashed.patch --]
[-- Type: application/octet-stream, Size: 1922 bytes --]

From 1cd98a092feb1891f81f21cd40a0a56bf4876296 Mon Sep 17 00:00:00 2001
From: Gaute Hope <eg@gaute.vetsj.com>
Date: Thu, 9 Sep 2010 13:48:49 +0200
Subject: [PATCH] Force UTF-8 on label and contact completion

Fix issue 36, by forcing UTF-8 encoding on string that will be matched.

Only if the force_encoding method is available to maintain 1.8
compatability.

There is likely to still be a few other places where the equivilent of
this bug still exists.

Also force encoding on label search completion

UTF-8 label completion: Convert existing labels
---
 lib/sup/buffer.rb |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/lib/sup/buffer.rb b/lib/sup/buffer.rb
index 04bbdcf..f3cfb8a 100644
--- a/lib/sup/buffer.rb
+++ b/lib/sup/buffer.rb
@@ -453,6 +453,7 @@ EOS
 
   def ask_with_completions domain, question, completions, default=nil
     ask domain, question, default do |s|
+      s.force_encoding 'UTF-8' if s.methods.include?(:encoding)
       completions.select { |x| x =~ /^#{Regexp::escape s}/i }.map { |x| [x, x] }
     end
   end
@@ -469,6 +470,8 @@ EOS
           raise "william screwed up completion: #{partial.inspect}"
         end
 
+      prefix.force_encoding 'UTF-8' if prefix.methods.include?(:encoding)
+      target.force_encoding 'UTF-8' if target.methods.include?(:encoding)
       completions.select { |x| x =~ /^#{Regexp::escape target}/i }.map { |x| [prefix + x, x] }
     end
   end
@@ -477,6 +480,7 @@ EOS
     ask domain, question, default do |partial|
       prefix, target = partial.split_on_commas_with_remainder
       target ||= prefix.pop || ""
+      target.force_encoding 'UTF-8' if target.methods.include?(:encoding)
       prefix = prefix.join(", ") + (prefix.empty? ? "" : ", ")
       completions.select { |x| x =~ /^#{Regexp::escape target}/i }.sort_by { |c| [ContactManager.contact_for(c) ? 0 : 1, c] }.map { |x| [prefix + x, x] }
     end
-- 
1.7.3


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCHES] resubmitted: Squash of various UTF-8 fixes for ruby 1.9 compatability, and update status on jump.
  2010-10-07 10:30 [PATCHES] resubmitted: Squash of various UTF-8 fixes for ruby 1.9 compatability, and update status on jump Gaute Hope
@ 2010-10-08  4:18 ` Rich Lane
  0 siblings, 0 replies; 2+ messages in thread
From: Rich Lane @ 2010-10-08  4:18 UTC (permalink / raw)
  To: Gaute Hope; +Cc: sup-devel

Excerpts from Gaute Hope's message of Thu Oct 07 06:30:10 -0400 2010:
> Hi,
> 
> resubmitting a squashed version of the three patches:
> 2010-10-04 adc49a0 Gaute Hope UTF-8 label completion: Convert existing labels (gaute/master, gaute)
> 2010-09-17 009cda0 Gaute Hope Also force encoding on label search completion
> 2010-09-09 c78e53f Gaute Hope Force UTF-8 on label and contact completion
> 
> And one for updating status on jump:
> 2010-09-23 64b739c Gaute Hope Update status on jump on line in line-cursor-mode
> 
> All four are available on (master):
> http://gitorious.org/~gauteh/sup/gautehs-mainline
> 
> Best regards, Gaute

Both applied to master.


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2010-10-08  4:18 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-10-07 10:30 [PATCHES] resubmitted: Squash of various UTF-8 fixes for ruby 1.9 compatability, and update status on jump Gaute Hope
2010-10-08  4:18 ` Rich Lane

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox