Chinaunix首页 | 论坛 | 博客
  • 博客访问: 1228167
  • 博文数量: 699
  • 博客积分: 6000
  • 博客等级: 准将
  • 技术积分: 4970
  • 用 户 组: 普通用户
  • 注册时间: 2008-10-15 13:45
文章分类

全部博文(699)

文章存档

2011年(1)

2008年(698)

我的朋友

分类:

2008-10-15 13:45:23

 #015  const bool selection_differs = (new_sel.cpMin != sel_before_change_.cpMin) ||
#016    (new_sel.cpMax != sel_before_change_.cpMax);
#017 
#018  // See if the text or selection have changed since OnBeforePossibleChange().
#019  const std::wstring new_text(GetText());
#020  const bool text_differs = (new_text != text_before_change_);
#021 
#022  // Update the paste state as appropriate: if we're just finishing a paste
#023  // that replaced all the text, preserve that information; otherwise, if we've
#024  // made some other edit, clear paste tracking.
#025  if (paste_state_ == REPLACING_ALL)
#026   paste_state_ = REPLACED_ALL;
#027  else if (text_differs)
#028   paste_state_ = NONE;
#029 
--------------------next---------------------
 #030  // If something has changed while the control key is down, prevent
#031  // "ctrl-enter" until the control key is released. When we do this, we need
#032  // to update the popup if it's open, since the desired_tld will have changed.
#033  if ((text_differs || selection_differs) &&
#034    (control_key_state_ == DOWN_WITHOUT_CHANGE)) {
#035   control_key_state_ = DOWN_WITH_CHANGE;
#036   if (!text_differs && !popup_->is_open())
#037    return false; // Don't open the popup for no reason.
#038  } else if (!text_differs &&
#039    (inline_autocomplete_text_.empty() || !selection_differs)) {
#040   return false;
#041  }
#042 
#043  const bool had_keyword = !is_keyword_hint_ && !keyword_.empty();
#044 
--------------------next---------------------

阅读(307) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~