From e1dcbebb3c8c989229e3f90a81d68a9ac3582796 Mon Sep 17 00:00:00 2001
From: Matthias BUSSONNIER <bussonniermatthias@gmail.com>
Date: Fri, 7 Feb 2014 12:56:36 +0100
Subject: [PATCH] [show-hint addon] Docs for #2228

add docs that when completions are object they can have a from: and to:
that will be used by pick.

Make sidebar in manual scrollable for small screen especially usefull
when `Programming API` is unfolded

seem to look nice on Chrome and Firefox Osx, (scrollbar do not appear,
except when scrolling on Chrome) but should maybe be tested on linux.
---
 doc/docs.css    |  4 +++-
 doc/manual.html | 13 +++++++++----
 2 files changed, 12 insertions(+), 5 deletions(-)

diff --git a/doc/docs.css b/doc/docs.css
index c7fb6327e..86e61d7b9 100644
--- a/doc/docs.css
+++ b/doc/docs.css
@@ -53,7 +53,9 @@ article {
 
 #nav {
   position: fixed;
-  top: 30px;
+  padding-top: 30px;
+  max-height: 100%;
+  overflow-y:scroll;
   left: 0; right: none;
   width: 160px;
   padding-right: 350px;
diff --git a/doc/manual.html b/doc/manual.html
index 8ebfeefeb..635088b6b 100644
--- a/doc/manual.html
+++ b/doc/manual.html
@@ -22,11 +22,10 @@
 
 <div id=nav>
   <a href="http://codemirror.net"><img id=logo src="logo.png"></a>
-
   <ul>
-    <li><a href="../index.html">Home</a>
-    <li><a href="#overview" class=active data-default="true">Manual</a>
-    <li><a href="https://github.com/marijnh/codemirror">Code</a>
+    <li><a href="../index.html">Home</a></li>
+    <li><a href="#overview" class=active data-default="true">Manual</a></li>
+    <li><a href="https://github.com/marijnh/codemirror">Code</a></li>
   </ul>
   <ul>
     <li><a href="#usage">Basic Usage</a></li>
@@ -2082,6 +2081,12 @@
         <dt><code><strong>hint</strong>: fn(CodeMirror, self, data)</code></dt>
         <dd>A method used to actually apply the completion, instead of
         the default behavior.</dd>
+        <dt><code><strong>from</strong>: {line, ch}</code></dt>
+        <dd>Optional <code>from</code> position that will be used by <code>pick()</code> instead
+        of the global one passed with the full list of completions.</dd>
+        <dt><code><strong>to</strong>: {line, ch}</code></dt>
+        <dd>Optional <code>to</code> position that will be used by <code>pick()</code> instead
+        of the global one passed with the full list of completions.</dd>
       </dl>
       The plugin understands the following options (the options object
       will also be passed along to the hinting function, which may
-- 
GitLab