From: Gaute Hope <eg@gaute.vetsj.com>
To: sup-devel <sup-devel@rubyforge.org>
Cc: Rich Lane <rlane@club.cc.cmu.edu>
Subject: [PATCHES] resubmitted: Squash of various UTF-8 fixes for ruby 1.9 compatability, and update status on jump.
Date: Thu, 07 Oct 2010 12:30:10 +0200 [thread overview]
Message-ID: <1286447030-sup-6339@dolk> (raw)
[-- 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
next reply other threads:[~2010-10-07 10:30 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-10-07 10:30 Gaute Hope [this message]
2010-10-08 4:18 ` Rich Lane
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1286447030-sup-6339@dolk \
--to=eg@gaute.vetsj.com \
--cc=rlane@club.cc.cmu.edu \
--cc=sup-devel@rubyforge.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox